Page MenuHomePhabricator

test: Wait until is_connected in add_p2p_connection
ClosedPublic

Authored by PiRK on Sep 7 2021, 11:06.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABC85f7e0cf3f71: test: Wait until is_connected in add_p2p_connection
Summary

Moving the wait_until from the individual test scripts to the test framework simplifies two tests

This is a backport of core#19657

Depends on D10064

Test Plan

ninja check-functional-extended

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

PiRK requested review of this revision.Sep 7 2021, 11:06
PiRK planned changes to this revision.Sep 7 2021, 11:07

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_leak.py ======

------- Stdout: -------
2021-09-07T11:08:58.682000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210907_110750/p2p_leak_45
2021-09-07T11:08:59.106000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:20540 due to [Errno 104] Connection reset by peer
2021-09-07T11:08:59.106000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 128, in main
    self.run_test()
  File "/work/test/functional/p2p_leak.py", line 150, in run_test
    no_version_disconnect_node.send_message(msg_verack())
  File "/work/test/functional/test_framework/p2p.py", line 271, in send_message
    return self.send_raw_message(tmsg)
  File "/work/test/functional/test_framework/p2p.py", line 279, in send_raw_message
    raise IOError('Not connected')
OSError: Not connected
2021-09-07T11:08:59.157000Z TestFramework (INFO): Stopping nodes
2021-09-07T11:08:59.409000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210907_110750/p2p_leak_45
2021-09-07T11:08:59.409000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210907_110750/p2p_leak_45/test_framework.log
2021-09-07T11:08:59.409000Z TestFramework (ERROR): 
2021-09-07T11:08:59.409000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_  _20210907_110750/p2p_leak_45' to consolidate all logs
2021-09-07T11:08:59.409000Z TestFramework (ERROR): 
2021-09-07T11:08:59.409000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2021-09-07T11:08:59.409000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2021-09-07T11:08:59.409000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_leak.py

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_leak.py ======

------- Stdout: -------
2021-09-07T11:13:41.200000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210907_111035/p2p_leak_45
2021-09-07T11:13:42.183000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:20540 due to [Errno 104] Connection reset by peer
2021-09-07T11:13:42.183000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 128, in main
    self.run_test()
  File "/work/test/functional/p2p_leak.py", line 150, in run_test
    no_version_disconnect_node.send_message(msg_verack())
  File "/work/test/functional/test_framework/p2p.py", line 271, in send_message
    return self.send_raw_message(tmsg)
  File "/work/test/functional/test_framework/p2p.py", line 279, in send_raw_message
    raise IOError('Not connected')
OSError: Not connected
2021-09-07T11:13:42.234000Z TestFramework (INFO): Stopping nodes
2021-09-07T11:13:42.636000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210907_111035/p2p_leak_45
2021-09-07T11:13:42.636000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210907_111035/p2p_leak_45/test_framework.log
2021-09-07T11:13:42.636000Z TestFramework (ERROR): 
2021-09-07T11:13:42.636000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20210907_111035/p2p_leak_45' to consolidate all logs
2021-09-07T11:13:42.636000Z TestFramework (ERROR): 
2021-09-07T11:13:42.636000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2021-09-07T11:13:42.636000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2021-09-07T11:13:42.636000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_leak.py

Failed tests logs:

====== Bitcoin ABC functional tests: p2p_leak.py ======

------- Stdout: -------
2021-09-07T11:13:52.213000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111139/p2p_leak_45
2021-09-07T11:13:52.690000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:20540 due to [Errno 104] Connection reset by peer
2021-09-07T11:13:52.690000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 128, in main
    self.run_test()
  File "/work/test/functional/p2p_leak.py", line 150, in run_test
    no_version_disconnect_node.send_message(msg_verack())
  File "/work/test/functional/test_framework/p2p.py", line 271, in send_message
    return self.send_raw_message(tmsg)
  File "/work/test/functional/test_framework/p2p.py", line 279, in send_raw_message
    raise IOError('Not connected')
OSError: Not connected
2021-09-07T11:13:52.743000Z TestFramework (INFO): Stopping nodes
2021-09-07T11:13:53.298000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111139/p2p_leak_45
2021-09-07T11:13:53.298000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111139/p2p_leak_45/test_framework.log
2021-09-07T11:13:53.298000Z TestFramework (ERROR): 
2021-09-07T11:13:53.298000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111139/p2p_leak_45' to consolidate all logs
2021-09-07T11:13:53.299000Z TestFramework (ERROR): 
2021-09-07T11:13:53.299000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2021-09-07T11:13:53.299000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2021-09-07T11:13:53.299000Z TestFramework (ERROR):
====== Bitcoin ABC functional tests with the next upgrade activated: p2p_leak.py ======

------- Stdout: -------
2021-09-07T11:17:30.073000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111503/p2p_leak_45
2021-09-07T11:17:30.565000Z TestFramework.p2p (WARNING): Connection lost to 127.0.0.1:20540 due to [Errno 32] Broken pipe
2021-09-07T11:17:30.565000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 128, in main
    self.run_test()
  File "/work/test/functional/p2p_leak.py", line 150, in run_test
    no_version_disconnect_node.send_message(msg_verack())
  File "/work/test/functional/test_framework/p2p.py", line 271, in send_message
    return self.send_raw_message(tmsg)
  File "/work/test/functional/test_framework/p2p.py", line 279, in send_raw_message
    raise IOError('Not connected')
OSError: Not connected
2021-09-07T11:17:30.616000Z TestFramework (INFO): Stopping nodes
2021-09-07T11:17:30.868000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111503/p2p_leak_45
2021-09-07T11:17:30.868000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111503/p2p_leak_45/test_framework.log
2021-09-07T11:17:30.869000Z TestFramework (ERROR): 
2021-09-07T11:17:30.869000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-diff/test/tmp/test_runner_₿₵_  _20210907_111503/p2p_leak_45' to consolidate all logs
2021-09-07T11:17:30.869000Z TestFramework (ERROR): 
2021-09-07T11:17:30.870000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2021-09-07T11:17:30.870000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2021-09-07T11:17:30.870000Z TestFramework (ERROR):

Each failure log is accessible here:
Bitcoin ABC functional tests: p2p_leak.py
Bitcoin ABC functional tests with the next upgrade activated: p2p_leak.py

This revision is now accepted and ready to land.Sep 7 2021, 13:44