nondeterministic failure of mydata.test.test_runner.RunNode.test_introducer #1646

Open
opened 2011-12-29 03:00:14 +00:00 by davidsarah · 0 comments
davidsarah commented 2011-12-29 03:00:14 +00:00
Owner

allmydata.test.test_runner.RunNode.test_introducer sometimes fails with the following error (found on sickness' buildslave):

  RunNode
    test_introducer ... Traceback (most recent call last):
  File "/home/bb-tahoe/bb-tahoe/sickness-openbsd-x86-py2.7/build/src/allmydata/test/test_runner.py", line 441, in _check_same_furl_and_port
    self.failUnlessEqual(self.furl, fileutil.read(INTRODUCER_FURL_FILE))
twisted.trial.unittest.FailTest: not equal:
a = ''
b = 'pb://w6x2bwklda63sm26ki7tqhieri5fl3fz@192.168.0.120:30549,127.0.0.1:30549/introducer\n'

[FAIL]

I believe the problem is due to an incorrect assumption in the test, that introducer.furl will be written before node.url. In fact they may be written in either order, because the init_introducer method of [IntroducerNode]source:src/allmydata/introducer/server.py writes introducer.furl concurrently with the init_web method of the same class (indirectly) writing node.url.

test_runner.py is prone to race conditions because we don't have a particularly reliable way to determine that a node has started, and so these tests rely on implementation details of when files are created during the startup process.

`allmydata.test.test_runner.RunNode.test_introducer` sometimes fails with the following error (found on sickness' buildslave): ``` RunNode test_introducer ... Traceback (most recent call last): File "/home/bb-tahoe/bb-tahoe/sickness-openbsd-x86-py2.7/build/src/allmydata/test/test_runner.py", line 441, in _check_same_furl_and_port self.failUnlessEqual(self.furl, fileutil.read(INTRODUCER_FURL_FILE)) twisted.trial.unittest.FailTest: not equal: a = '' b = 'pb://w6x2bwklda63sm26ki7tqhieri5fl3fz@192.168.0.120:30549,127.0.0.1:30549/introducer\n' [FAIL] ``` I believe the problem is due to an incorrect assumption in the test, that `introducer.furl` will be written before `node.url`. In fact they may be written in either order, because the `init_introducer` method of [IntroducerNode]source:src/allmydata/introducer/server.py writes `introducer.furl` concurrently with the `init_web` method of the same class (indirectly) writing `node.url`. `test_runner.py` is prone to race conditions because we don't have a particularly reliable way to determine that a node has started, and so these tests rely on implementation details of when files are created during the startup process.
tahoe-lafs added the
code
major
defect
1.9.0
labels 2011-12-29 03:00:14 +00:00
tahoe-lafs added this to the undecided milestone 2011-12-29 03:00:14 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#1646
No description provided.