Wait up to 10 seconds for incoming changes from SMB notifier
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
parent
74b4655696
commit
1de05264a6
|
@ -102,7 +102,14 @@ class SmbTest extends \Test\Files\Storage\Storage {
|
||||||
$this->instance->unlink('/renamed.txt');
|
$this->instance->unlink('/renamed.txt');
|
||||||
sleep(1); //time for all changes to be processed
|
sleep(1); //time for all changes to be processed
|
||||||
|
|
||||||
$changes = $notifyHandler->getChanges();
|
$changes = [];
|
||||||
|
$count = 0;
|
||||||
|
// wait up to 10 seconds for incoming changes
|
||||||
|
while (count($changes) < 3 && $count < 10) {
|
||||||
|
$changes = array_merge($changes, $notifyHandler->getChanges());
|
||||||
|
$count++;
|
||||||
|
sleep(1);
|
||||||
|
}
|
||||||
$notifyHandler->stop();
|
$notifyHandler->stop();
|
||||||
|
|
||||||
$expected = [
|
$expected = [
|
||||||
|
|
Loading…
Reference in New Issue