From 23688b236bf6bbfad771b03a1096bbcf44e3a804 Mon Sep 17 00:00:00 2001 From: David Stainton Date: Tue, 26 May 2015 08:10:21 -0700 Subject: [PATCH] Add sleep to test --- src/allmydata/test/test_drop_upload.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/allmydata/test/test_drop_upload.py b/src/allmydata/test/test_drop_upload.py index 186a8763..424c498d 100644 --- a/src/allmydata/test/test_drop_upload.py +++ b/src/allmydata/test/test_drop_upload.py @@ -251,7 +251,7 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_queued'), 0)) d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.directories_created'), 1)) - def _move_dir_away(): + def _move_dir_away(ign): os.rename(new_empty_tree_dir, empty_tree_dir) # XXX mock notify event #self.notify_close_write(to_filepath(new_empty_tree_dir)) @@ -266,6 +266,9 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA #self.notify_close_write(to_filepath(test_file)) return d2 d.addCallback(create_file) + def sleep_a_while(ign): + time.sleep(3) + d.addCallback(sleep_a_while) d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_uploaded'), 1)) d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.files_uploaded'), 0)) d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.objects_queued'), 0)) -- 2.45.2