test: extend timeout on the hotline file that prevents the client from stopping itself
authorZooko O'Whielacronx <zooko@zooko.com>
Mon, 22 Dec 2008 04:06:29 +0000 (21:06 -0700)
committerZooko O'Whielacronx <zooko@zooko.com>
Mon, 22 Dec 2008 04:06:29 +0000 (21:06 -0700)
The 20-second timeout was apparently tripped on my Powerbook G4 "draco".

src/allmydata/client.py
src/allmydata/test/test_runner.py

index 7022279e1f2a4d31dcc26bb670bad7101128592e..a9b9a52f905bfa053447a1c98b3eb4bb80443670 100644 (file)
@@ -292,7 +292,7 @@ class Client(node.Node, pollmixin.PollMixin):
     def _check_hotline(self, hotline_file):
         if os.path.exists(hotline_file):
             mtime = os.stat(hotline_file)[stat.ST_MTIME]
-            if mtime > time.time() - 20.0:
+            if mtime > time.time() - 40.0:
                 return
             else:
                 self.log("hotline file too old, shutting down")
index df9440afde782a3cc1723f6c8d3bfb700c0a9550..c4b86684489c3af94a479b7b866293224ff734f0 100644 (file)
@@ -203,9 +203,9 @@ class RunNode(unittest.TestCase, pollmixin.PollMixin):
         out,err = StringIO(), StringIO()
         rc = runner.runner(argv, stdout=out, stderr=err)
         self.failUnlessEqual(rc, 0)
-        # by writing this file, we get ten seconds before the client will
-        # exit. This insures that even if the test fails (and the 'stop'
-        # command doesn't work), the client should still terminate.
+        # By writing this file, we get forty seconds before the client will exit. This insures
+        # that even if the 'stop' command doesn't work (and the test fails), the client should
+        # still terminate.
         HOTLINE_FILE = os.path.join(c1, "suicide_prevention_hotline")
         open(HOTLINE_FILE, "w").write("")
         open(os.path.join(c1, "introducer.furl"), "w").write("pb://xrndsskn2zuuian5ltnxrte7lnuqdrkz@127.0.0.1:55617/introducer\n")