Skip to content
Snippets Groups Projects
Commit ce852139 authored by Eric Smith's avatar Eric Smith Committed by Jakob P
Browse files

Issue #2996055: Test coverage

parent 63aa2158
Branches 1.0.x
Tags 1.0.1
1 merge request!23Set tolerance to 0 during tests
Pipeline #178638 failed
......@@ -2,6 +2,8 @@
namespace Drupal\Tests\memcache\Kernel;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\DependencyInjection\ServiceModifierInterface;
use Drupal\KernelTests\Core\Cache\GenericCacheBackendUnitTestBase;
use Drupal\memcache\MemcacheBackendFactory;
......@@ -10,7 +12,7 @@ use Drupal\memcache\MemcacheBackendFactory;
*
* @group memcache
*/
class MemcacheBackendTest extends GenericCacheBackendUnitTestBase {
class MemcacheBackendTest extends GenericCacheBackendUnitTestBase implements ServiceModifierInterface {
/**
* Modules to enable.
......@@ -19,6 +21,15 @@ class MemcacheBackendTest extends GenericCacheBackendUnitTestBase {
*/
public static $modules = ['system', 'memcache'];
/**
* {@inheritdoc}
*/
public function alter(ContainerBuilder $container) {
$service_definition = $container->getDefinition('memcache.timestamp.invalidator.bin');
// Set tolerance to 0 for timestamp invalidator.
$service_definition->setArgument(2, 0);
}
/**
* Creates a new instance of DatabaseBackend.
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment