Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intermittent magic_folder.test.test_participants.CollectiveParticipantsTests.test_list failure #246

Closed
exarkun opened this issue Aug 11, 2020 · 1 comment · Fixed by #249

Comments

@exarkun
Copy link
Member

exarkun commented Aug 11, 2020

On the NixOS CI job:

[FAIL]
Traceback (most recent call last):
Failure: testtools.testresult.real._StringException: Traceback (most recent call last):
  File "/nix/store/jw70h4p4hwk7kz6iaa687v5sn25z6hnf-python2.7-Twisted-18.9.0/lib/python2.7/site-packages/twisted/internet/defer.py", line 151, in maybeDeferred
    result = f(*args, **kw)
  File "/nix/store/i2r7a7slgw3300wcvn79bjdczqw83gnd-python2.7-testtools-2.3.0/lib/python2.7/site-packages/testtools/testcase.py", line 719, in _run_test_method
    return self._get_test_method()()
  File "/nix/store/kaskk8zchplh2vy6ib08clspcb9idlsd-python2.7-magic-folder-2020-02-05/lib/python2.7/site-packages/magic_folder/test/test_participants.py", line 149, in test_list
    dictionaries(
  File "/nix/store/5w1h6gwajic64alfjkxrsfiwz80q62ga-python2.7-hypothesis-4.7.3/lib/python2.7/site-packages/hypothesis/core.py", line 974, in wrapped_test
    state.run()
  File "/nix/store/5w1h6gwajic64alfjkxrsfiwz80q62ga-python2.7-hypothesis-4.7.3/lib/python2.7/site-packages/hypothesis/core.py", line 695, in run
    info.__expected_traceback,
  File "/nix/store/5w1h6gwajic64alfjkxrsfiwz80q62ga-python2.7-hypothesis-4.7.3/lib/python2.7/site-packages/hypothesis/core.py", line 568, in execute
    result = self.test_runner(data, run)
  File "/nix/store/5w1h6gwajic64alfjkxrsfiwz80q62ga-python2.7-hypothesis-4.7.3/lib/python2.7/site-packages/hypothesis/executors.py", line 56, in default_new_style_executor
    return function(data)
  File "/nix/store/5w1h6gwajic64alfjkxrsfiwz80q62ga-python2.7-hypothesis-4.7.3/lib/python2.7/site-packages/hypothesis/core.py", line 566, in run
    return test(*args, **kwargs)
  File "/nix/store/kaskk8zchplh2vy6ib08clspcb9idlsd-python2.7-magic-folder-2020-02-05/lib/python2.7/site-packages/magic_folder/test/test_participants.py", line 216, in test_list
    Equals(int(upload_dircap in collective_contents.values())),
  File "/nix/store/i2r7a7slgw3300wcvn79bjdczqw83gnd-python2.7-testtools-2.3.0/lib/python2.7/site-packages/testtools/testcase.py", line 498, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: Differences: [
2 != 1: after <function <lambda>> on [_CollectiveDirnodeParticipant(name=u'', dirobj=Node(tahoe_client=TahoeClient(node_uri=DecodedURL(url=URL.from_text(u'http://example.invalid./')), agent=<treq.client.HTTPClient object at 0x7f6925e4eed0>), uri=<DirectoryURI aaaaa>), is_self=True), _CollectiveDirnodeParticipant(name=u'0', dirobj=Node(tahoe_client=TahoeClient(node_uri=DecodedURL(url=URL.from_text(u'http://example.invalid./')), agent=<treq.client.HTTPClient object at 0x7f6925e4eed0>), uri=<DirectoryURI aaaaa>), is_self=True)]
]
@exarkun
Copy link
Member Author

exarkun commented Aug 12, 2020

I surmise that Hypothesis generated a collective that contained a duplicate DMD which caused the test to find two participants which identify as self but the test was only capable of asserting that the result was either zero or one participants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant