]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Add stats counter checking to uploader service start test
authorDavid Stainton <dstainton415@gmail.com>
Sat, 18 Apr 2015 03:50:54 +0000 (04:50 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Tue, 28 Apr 2015 18:39:38 +0000 (19:39 +0100)
src/allmydata/test/test_drop_upload.py

index c174a90a5756eb6930198fb621deb3a6bbd08f18..7f3a770d99353dc8ca01e32fb3d9b29ffcf4f8c5 100644 (file)
@@ -63,9 +63,13 @@ class DropUploadTestMixin(GridTestMixin, ShouldFailMixin, ReallyEqualMixin, NonA
         self.uploader = None
         self.set_up_grid()
         self.client = self.g.clients[0]
+        self.stats_provider = self.client.stats_provider
+
         d = self.client.create_dirnode()
         d.addCallback(self._made_upload_dir)
+        d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.dirs_monitored'), 1))
         d.addBoth(self._cleanup)
+        d.addCallback(lambda ign: self.failUnlessReallyEqual(self._get_count('drop_upload.dirs_monitored'), 0))
         return d
 
     def _test_move_tree(self):