summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-02-10 17:38:29 +0100
committerRobin Appelman <robin@icewind.nl>2017-02-10 17:38:29 +0100
commitd9a6353bc1448aa599e27b6c70a47197c604a56a (patch)
tree357c5478f6f75a4bd0bf47bf553319cdf06712f5 /apps/files_external
parentb4ade766656a2032f33d56eb4a0f17bb128af722 (diff)
downloadnextcloud-server-d9a6353bc1448aa599e27b6c70a47197c604a56a.tar.gz
nextcloud-server-d9a6353bc1448aa599e27b6c70a47197c604a56a.zip
Make the notify self test for subfolders more reliable
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/Command/Notify.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/files_external/lib/Command/Notify.php b/apps/files_external/lib/Command/Notify.php
index a55b16a45c4..55d7eef5823 100644
--- a/apps/files_external/lib/Command/Notify.php
+++ b/apps/files_external/lib/Command/Notify.php
@@ -184,15 +184,20 @@ class Notify extends Base {
$storage->file_put_contents('/.nc_test_file.txt', 'test content');
$storage->mkdir('/.nc_test_folder');
$storage->file_put_contents('/.nc_test_folder/subfile.txt', 'test content');
+
+ usleep(100 * 1000); //time for all changes to be processed
+ $changes = $notifyHandler->getChanges();
+
$storage->unlink('/.nc_test_file.txt');
$storage->unlink('/.nc_test_folder/subfile.txt');
$storage->rmdir('/.nc_test_folder');
+
usleep(100 * 1000); //time for all changes to be processed
+ $notifyHandler->getChanges(); // flush
$foundRootChange = false;
$foundSubfolderChange = false;
- $changes = $notifyHandler->getChanges();
foreach ($changes as $change) {
if ($change->getPath() === '/.nc_test_file.txt') {
$foundRootChange = true;