Skip to content
Snippets Groups Projects

Expand test platforms.

Merged Jakob P requested to merge issue/memcache-2996055:2996055-moretests into 8.x-2.x
1 unresolved thread

Closes #2996055

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
46 55 return $factory->get($bin);
47 56 }
48 57
58 /**
59 * Gets a backend to test; this will get a shared instance set in the object.
60 *
61 * @return \Drupal\Core\Cache\CacheBackendInterface
62 * Cache backend to test.
63 */
64 protected function getCacheBackend($bin = NULL) {
65 $backend = parent::getCacheBackend($bin);
66 usleep(10000);
  • If this were in ::setUp(), it'd be fine, because e.g. \Drupal\KernelTests\Core\Cache\DatabaseBackendTest::testGarbageCollection() does this too. Plenty more tests in core even, grep usleep( in *Test.php :nerd:

    BUT doing it like this, for every single call, that's definitely fishy :sweat_smile:🧟‍♀️

    I hear you can reproduce this locally too, even if not 100% of the time. I'd start investigating this locally, because it'll be easier to drop down into lower layers to debug what exactly is going on with memcached.

  • Author Maintainer

    The main issue is that it needs to run usleep on every new bin. an optimization might be to check to see if the bin has been called before and skip it, but since its a test.. idk if optimization is needed here.

  • Please register or sign in to reply
  • Jakob P added 5 commits

    added 5 commits

    • ae689e0c - 1 commit from branch project:8.x-2.x
    • d645d0d7 - Expand test platforms.
    • da0b7d0e - More debugging of the memcache drivers and tests
    • 4745d8b4 - Move where functional test should be.
    • 4d38f0fd - Add timer for cache backend sleep

    Compare with previous version

  • merged

  • Please register or sign in to reply
    Loading