Tribler / py-ipv8

Python implementation of Tribler's IPv8 p2p-networking layer
GNU Lesser General Public License v3.0
231 stars 47 forks source link

Error in the bootstrap tests on Mac #635

Closed devos50 closed 4 years ago

devos50 commented 4 years ago

I've seen the following error multiple times already during PR tests (on Mac):

======================================================================
FAIL: Check if we can bootstrap our peerdiscovery.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/twisted/internet/defer.py", line 1299, in _inlineCallbacks
    result = g.send(result)
  File "/Users/tribler/Documents/workspace2/workspace/ipv8/test_ipv8_PR_unittests_mac/ipv8/test/peerdiscovery/test_community.py", line 79, in test_bootstrap
    self.assertEqual(len(intros), 1)
  File "/Library/Python/2.7/site-packages/twisted/trial/_synctest.py", line 425, in assertEqual
    super(_Assertions, self).assertEqual(first, second, msg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 513, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 506, in _baseAssertEqual
    raise self.failureException(msg)
FailTest: 3 != 1
--------------------
qstokkink commented 4 years ago

Ah I see, the test is using get_introductions_from instead of get_peers. If the machine is too fast, it will get more than 1 introduction option for the same peer.