From: Daira Hopwood Date: Thu, 3 Sep 2015 18:42:37 +0000 (+0100) Subject: Add _restart_client callback. X-Git-Url: https://git.rkrishnan.org/reedownlee?a=commitdiff_plain;h=729d70b1a53c289b89c48935922815961ba81781;p=tahoe-lafs%2Ftahoe-lafs.git Add _restart_client callback. Signed-off-by: Daira Hopwood --- diff --git a/src/allmydata/test/test_magic_folder.py b/src/allmydata/test/test_magic_folder.py index 9d4d6d73..fb75114e 100644 --- a/src/allmydata/test/test_magic_folder.py +++ b/src/allmydata/test/test_magic_folder.py @@ -42,6 +42,19 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual self.failUnlessEqual(bdb.VERSION, 3) return bdb + def _restart_client(self, ign): + print "_restart_client" + d = self.restart_client() + def _restarted(ign): + print "_restarted" + self.client = self.get_client() + print self.client + print self.client.services + self.magicfolder = self.client.getServiceNamed('magic-folder') + #self.magicfolder.ready() + d.addCallback(_restarted) + return d + def _create_magicfolder(self, ign): dbfile = abspath_expanduser_unicode(u"magicfolderdb.sqlite", base=self.basedir) self.magicfolder = MagicFolder(self.client, self.upload_dircap, self.collective_dircap, self.local_dir, @@ -95,7 +108,7 @@ class MagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, ReallyEqual self.stats_provider = self.client.stats_provider d = self.create_invite_join_magic_folder(u"Alice", self.local_dir) - d.addCallback(self._create_magicfolder) + d.addCallback(self._restart_client) d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('uploader.dirs_monitored'), 1)) d.addBoth(self.cleanup)