Page MenuHomePhabricator

[avalanche] Make contender test more comprehensive
AcceptedPublic

Authored by roqqit on Tue, Feb 25, 04:16.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Summary

The current iteration of this test tries to hand pick a manual winner first and then dances around the possibilities that stem from that. A better approach is to test all of the contenders so we can be sure there are no anomalies, and then select a manual winner that we know isn't already a winner.

Depends on D17695

Test Plan

Run the test a few times to make sure it is robust:

for I in {0..10}; do ./test/functional/test_runner.py abc_p2p_avalanche_contender_voting || break ; done

Diff Detail

Repository
rABC Bitcoin ABC
Branch
sc-better-contender-test
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32476
Build 64440: Build Diffbuild-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 64439: arc lint + arc unit

Event Timeline

roqqit requested review of this revision.Tue, Feb 25, 04:16

Failed tests logs:

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

------- Stdout: -------
2025-02-25T04:19:06.530000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_041806/abc_p2p_avalanche_contender_voting_60
2025-02-25T04:19:07.036000Z TestFramework (ERROR): JSONRPC error
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 149, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 139, in _run_test_internal
    self.run_test()
  File "/work/test/functional/abc_p2p_avalanche_contender_voting.py", line 70, in run_test
    quorum = get_quorum()
             ^^^^^^^^^^^^
  File "/work/test/functional/abc_p2p_avalanche_contender_voting.py", line 67, in get_quorum
    return [new_ava_interface(node) for _ in range(0, QUORUM_NODE_COUNT)]
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/abc_p2p_avalanche_contender_voting.py", line 67, in <listcomp>
    return [new_ava_interface(node) for _ in range(0, QUORUM_NODE_COUNT)]
            ^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/abc_p2p_avalanche_contender_voting.py", line 53, in new_ava_interface
    payoutAddress = node.getnewaddress()
                    ^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/coverage.py", line 46, in __call__
    return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/test_framework/authproxy.py", line 150, in __call__
    raise JSONRPCException(response["error"], status)
test_framework.authproxy.JSONRPCException: Method not found (-32601)
2025-02-25T04:19:07.087000Z TestFramework (INFO): Stopping nodes
2025-02-25T04:19:07.339000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_041806/abc_p2p_avalanche_contender_voting_60
2025-02-25T04:19:07.339000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_041806/abc_p2p_avalanche_contender_voting_60/test_framework.log
2025-02-25T04:19:07.339000Z TestFramework (ERROR): 
2025-02-25T04:19:07.339000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_041806/abc_p2p_avalanche_contender_voting_60' to consolidate all logs
2025-02-25T04:19:07.339000Z TestFramework (ERROR): 
2025-02-25T04:19:07.339000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-02-25T04:19:07.339000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2025-02-25T04:19:07.339000Z TestFramework (ERROR):

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

Failed tests logs:

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

------- Stdout: -------
2025-02-25T04:43:00.294000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_044258/abc_p2p_getavaaddr_4
2025-02-25T04:44:05.831000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        def test_function():
            if check_connected:
                assert self.is_connected
            return test_function_in()
'''
2025-02-25T04:44:05.831000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 149, in main
    self._run_test_internal()
  File "/work/test/functional/test_framework/test_framework.py", line 139, in _run_test_internal
    self.run_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 554, in run_test
    self.getavaaddr_interval_test()
  File "/work/test/functional/abc_p2p_getavaaddr.py", line 192, in getavaaddr_interval_test
    requester.wait_until(requester.addr_received)
  File "/work/test/functional/test_framework/p2p.py", line 582, in wait_until
    wait_until_helper(
  File "/work/test/functional/test_framework/util.py", line 296, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
        def test_function():
            if check_connected:
                assert self.is_connected
            return test_function_in()
''' not true after 60.0 seconds
2025-02-25T04:44:05.882000Z TestFramework (INFO): Stopping nodes
2025-02-25T04:44:06.084000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_044258/abc_p2p_getavaaddr_4
2025-02-25T04:44:06.084000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_044258/abc_p2p_getavaaddr_4/test_framework.log
2025-02-25T04:44:06.084000Z TestFramework (ERROR): 
2025-02-25T04:44:06.084000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-without-wallet/test/tmp/test_runner_₿₵_🏃_20250225_044258/abc_p2p_getavaaddr_4' to consolidate all logs
2025-02-25T04:44:06.084000Z TestFramework (ERROR): 
2025-02-25T04:44:06.084000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-02-25T04:44:06.084000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2025-02-25T04:44:06.084000Z TestFramework (ERROR):

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

This revision is now accepted and ready to land.Tue, Feb 25, 09:52