From: David Stainton Date: Tue, 26 May 2015 15:10:21 +0000 (-0700) Subject: Add sleep to test X-Git-Url: https://git.rkrishnan.org/%5B/frontends/somewhere?a=commitdiff_plain;h=d8d8836d0842be6d6717a2c09c3c4fe6cb399d73;p=tahoe-lafs%2Ftahoe-lafs.git Add sleep to test --- diff --git a/src/allmydata/test/test_drop_upload.py b/src/allmydata/test/test_drop_upload.py index 5f2520be..d74cc56d 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))