aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_external/tests
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2019-03-12 17:16:03 +0100
committerMorris Jobke <hey@morrisjobke.de>2019-03-13 18:01:24 +0100
commitab29028da775015993533c24db3ad21023b82a5e (patch)
treede9117996e9a3957326896006f5ede52bbed08fe /apps/files_external/tests
parent38dd3da92bf6b8fd5e180b03bae28806f731992b (diff)
downloadnextcloud-server-ab29028da775015993533c24db3ad21023b82a5e.tar.gz
nextcloud-server-ab29028da775015993533c24db3ad21023b82a5e.zip
Wait up to 10 seconds for incoming changes from SMB notifier
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/files_external/tests')
-rw-r--r--apps/files_external/tests/Storage/SmbTest.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/apps/files_external/tests/Storage/SmbTest.php b/apps/files_external/tests/Storage/SmbTest.php
index e3c0408114d..562ac6c8e5e 100644
--- a/apps/files_external/tests/Storage/SmbTest.php
+++ b/apps/files_external/tests/Storage/SmbTest.php
@@ -102,7 +102,14 @@ class SmbTest extends \Test\Files\Storage\Storage {
$this->instance->unlink('/renamed.txt');
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();
$expected = [