8000 [Cache] Skip tests that sleep() but can't be clock-mocked by nicolas-grekas · Pull Request #19544 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Cache] Skip tests that sleep() but can't be clock-mocked #19544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 5, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

abstract class AbstractRedisAdapterTest extends AdapterTestCase
{
protected $skippedTests = array(
'testExpiration' => 'Testing expiration slows down the test suite',
'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite',
'testDefaultLifeTime' => 'Testing expiration slows down the test suite',
);

protected static $redis;

public function createCachePool($defaultLifetime = 0)
Expand Down
6 changes: 6 additions & 0 deletions src/Symfony/Component/Cache/Tests/Adapter/ApcuAdapterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@

class ApcuAdapterTest extends AdapterTestCase
{
protected $skippedTests = array(
'testExpiration' => 'Testing expiration slows down the test suite',
'testHasItemReturnsFalseWhenDeferredItemIsExpired' => 'Testing expiration slows down the test suite',
'testDefaultLifeTime' => 'Testing expiration slows down the test suite',
);

public function createCachePool($defaultLifetime = 0)
{
if (!function_exists('apcu_fetch') || !ini_get('apc.enabled') || ('cli' === PHP_SAPI && !ini_get('apc.enable_cli'))) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

/**
* @author Kévin Dunglas <dunglas@gmail.com>
* @group time-sensitive
*/
class ChainAdapterTest extends AdapterTestCase
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ class DoctrineAdapterTest extends AdapterTestCase

public function createCachePool($defaultLifetime = 0)
{
return new DoctrineAdapter(new ArrayCache(), '', $defaultLifetime);
return new DoctrineAdapter(new ArrayCache($defaultLifetime), '', $defaultLifetime);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ class NamespacedProxyAdapterTest extends ProxyAdapterTest
{
public function createCachePool($defaultLifetime = 0)
{
return new ProxyAdapter(new ArrayAdapter(), 'foo', $defaultLifetime);
return new ProxyAdapter(new ArrayAdapter($defaultLifetime), 'foo', $defaultLifetime);
}
}
0