mirror of
https://github.com/idanoo/php-resque
synced 2025-07-01 13:42:22 +00:00
Add sleep for tests
This commit is contained in:
parent
94cae8d271
commit
6737df5925
2 changed files with 4 additions and 1 deletions
|
@ -71,6 +71,6 @@ class Stat
|
||||||
*/
|
*/
|
||||||
public static function clear(string $stat): bool
|
public static function clear(string $stat): bool
|
||||||
{
|
{
|
||||||
return (bool)Resque::redis()->unlink('stat:' . $stat);
|
return (bool)Resque::redis()->del('stat:' . $stat);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -198,6 +198,9 @@ class WorkerTest extends TestCase
|
||||||
$worker->work(0);
|
$worker->work(0);
|
||||||
$worker->work(0);
|
$worker->work(0);
|
||||||
|
|
||||||
|
// Allow time for async unlink to work
|
||||||
|
sleep(2);
|
||||||
|
|
||||||
$this->assertEquals(0, $worker->getStat('processed'));
|
$this->assertEquals(0, $worker->getStat('processed'));
|
||||||
$this->assertEquals(0, $worker->getStat('failed'));
|
$this->assertEquals(0, $worker->getStat('failed'));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue