From: Brian Warner <warner@allmydata.com>
Date: Wed, 26 Sep 2007 04:03:54 +0000 (-0700)
Subject: test_client.py: add TODO to test the hotline-timeout file
X-Git-Tag: allmydata-tahoe-0.6.1~81
X-Git-Url: https://git.rkrishnan.org/Site/Content/Exhibitors/readonly?a=commitdiff_plain;h=aafccf7008acf5b7dc853f52e3ef3dbf1a15a0c8;p=tahoe-lafs%2Ftahoe-lafs.git

test_client.py: add TODO to test the hotline-timeout file
---

diff --git a/src/allmydata/test/test_client.py b/src/allmydata/test/test_client.py
index 23772604..ee40ef86 100644
--- a/src/allmydata/test/test_client.py
+++ b/src/allmydata/test/test_client.py
@@ -163,6 +163,14 @@ class Run(unittest.TestCase):
         d = self.stall(delay=0.1)
         d.addCallback(lambda res: c1.disownServiceParent())
         def _restart(res):
+            # TODO: pause for slightly over one second, to let
+            # Client._check_hotline poll the file once. That will exercise
+            # another few lines. Then add another test in which we don't
+            # update the file at all, and watch to see the node shutdown. (to
+            # do this, use a modified node which overrides Node.shutdown(),
+            # also change _check_hotline to use it instead of a raw
+            # reactor.stop, also instrument the shutdown event in an
+            # attribute that we can check)
             c2 = client.Client(basedir)
             c2.setServiceParent(self.sparent)
             return c2.disownServiceParent()