From: David Stainton Date: Wed, 27 Jan 2016 15:43:02 +0000 (+0000) Subject: Work in progress on fixing test_periodic_full_scan. X-Git-Url: https://git.rkrishnan.org/pf/content/%22file:/%5B%5E?a=commitdiff_plain;h=bafe5b7e7f0e6d35714d8870723c4d6eb17e7d85;p=tahoe-lafs%2Ftahoe-lafs.git Work in progress on fixing test_periodic_full_scan. --- diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index 4bfddbe0..383a41ca 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -1231,18 +1231,18 @@ class MockTest(MagicFolderTestMixin, unittest.TestCase): def _create_file_without_event(res): print "CREATE FILE WITHOUT EMITTING EVENT" - uploaded_d = self.magicfolder.uploader.set_hook('processed') + processed_d = self.magicfolder.uploader.set_hook('processed') what_path = abspath_expanduser_unicode(u"what", base=new_empty_tree_dir) fileutil.write(what_path, "say when") print "ADVANCE CLOCK" - #alice_clock.advance(self.magicfolder.uploader._periodic_full_scan_duration + 1) - return uploaded_d + alice_clock.advance(self.magicfolder.uploader._periodic_full_scan_duration + 1) + return processed_d d.addCallback(_create_file_without_event) def _advance_clock(res): print "_advance_clock" - alice_clock.advance(self.magicfolder.uploader._periodic_full_scan_duration + 1) - d.addCallback(_advance_clock) - d.addCallback(_advance_clock) + processed_d = self.magicfolder.uploader.set_hook('processed') + alice_clock.advance(0) + return processed_d d.addCallback(_advance_clock) d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.files_uploaded'), 1)) d.addCallback(lambda ign: self.magicfolder.finish())