mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-06-22 08:50:07 +00:00
test: extend timeout on the hotline file that prevents the client from stopping itself
The 20-second timeout was apparently tripped on my Powerbook G4 "draco".
This commit is contained in:
@ -292,7 +292,7 @@ class Client(node.Node, pollmixin.PollMixin):
|
|||||||
def _check_hotline(self, hotline_file):
|
def _check_hotline(self, hotline_file):
|
||||||
if os.path.exists(hotline_file):
|
if os.path.exists(hotline_file):
|
||||||
mtime = os.stat(hotline_file)[stat.ST_MTIME]
|
mtime = os.stat(hotline_file)[stat.ST_MTIME]
|
||||||
if mtime > time.time() - 20.0:
|
if mtime > time.time() - 40.0:
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
self.log("hotline file too old, shutting down")
|
self.log("hotline file too old, shutting down")
|
||||||
|
@ -203,9 +203,9 @@ class RunNode(unittest.TestCase, pollmixin.PollMixin):
|
|||||||
out,err = StringIO(), StringIO()
|
out,err = StringIO(), StringIO()
|
||||||
rc = runner.runner(argv, stdout=out, stderr=err)
|
rc = runner.runner(argv, stdout=out, stderr=err)
|
||||||
self.failUnlessEqual(rc, 0)
|
self.failUnlessEqual(rc, 0)
|
||||||
# by writing this file, we get ten seconds before the client will
|
# By writing this file, we get forty seconds before the client will exit. This insures
|
||||||
# exit. This insures that even if the test fails (and the 'stop'
|
# that even if the 'stop' command doesn't work (and the test fails), the client should
|
||||||
# command doesn't work), the client should still terminate.
|
# still terminate.
|
||||||
HOTLINE_FILE = os.path.join(c1, "suicide_prevention_hotline")
|
HOTLINE_FILE = os.path.join(c1, "suicide_prevention_hotline")
|
||||||
open(HOTLINE_FILE, "w").write("")
|
open(HOTLINE_FILE, "w").write("")
|
||||||
open(os.path.join(c1, "introducer.furl"), "w").write("pb://xrndsskn2zuuian5ltnxrte7lnuqdrkz@127.0.0.1:55617/introducer\n")
|
open(os.path.join(c1, "introducer.furl"), "w").write("pb://xrndsskn2zuuian5ltnxrte7lnuqdrkz@127.0.0.1:55617/introducer\n")
|
||||||
|
Reference in New Issue
Block a user