mirror of
https://github.com/idanoo/php-resque.git
synced 2024-11-21 16:01:53 +00:00
Add sleep for tests
This commit is contained in:
parent
94cae8d271
commit
6737df5925
@ -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…
Reference in New Issue
Block a user