Page MenuHomePhabricator

[avalanche] Simplify the wait_for_proof test facility
ClosedPublic

Authored by Fabien on Jul 27 2022, 09:44.

Details

Reviewers
sdulfari
Group Reviewers
Restricted Project
Commits
rABC30cb6a23682d: [avalanche] Simplify the wait_for_proof test facility
Summary

Let it take the expected status rather than flagging the orphan special case. This makes the tests more robust as we are sure of what is being tested.

Depends on D11802.

Test Plan
ninja all check-extended

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_wait_for_proof
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 19746
Build 39211: Build Diffbuild-without-wallet · build-diff · build-debug · build-clang-tidy · build-clang
Build 39210: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Jul 27 2022, 09:44
sdulfari requested changes to this revision.Jul 27 2022, 17:53
sdulfari added a subscriber: sdulfari.
sdulfari added inline comments.
test/functional/test_framework/avatools.py
159 ↗(On Diff #34527)

It's no longer a don't care param

This revision now requires changes to proceed.Jul 27 2022, 17:53

Failed tests logs:

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

------- Stdout: -------
2022-07-28T15:19:41.698000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20220728_151710/abc_p2p_proof_inventory_26
2022-07-28T15:19:42.727000Z TestFramework (INFO): Test sending a proof to our peers
2022-07-28T15:20:43.841000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: ''''
        self.wait_until(lambda: all(proof_inv_found(i) for i in node.p2ps))
'''
2022-07-28T15:20:43.841000Z TestFramework (ERROR): Assertion failed
Traceback (most recent call last):
  File "/work/test/functional/test_framework/test_framework.py", line 136, in main
    self.run_test()
  File "/work/test/functional/abc_p2p_proof_inventory.py", line 296, in run_test
    self.test_send_proof_inv()
  File "/work/test/functional/abc_p2p_proof_inventory.py", line 80, in test_send_proof_inv
    self.wait_until(lambda: all(proof_inv_found(i) for i in node.p2ps))
  File "/work/test/functional/test_framework/test_framework.py", line 677, in wait_until
    timeout_factor=self.options.timeout_factor)
  File "/work/test/functional/test_framework/util.py", line 284, in wait_until_helper
    "Predicate {} not true after {} seconds".format(predicate_source, timeout))
AssertionError: Predicate ''''
        self.wait_until(lambda: all(proof_inv_found(i) for i in node.p2ps))
''' not true after 60.0 seconds
2022-07-28T15:20:43.893000Z TestFramework (INFO): Stopping nodes
2022-07-28T15:20:44.205000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20220728_151710/abc_p2p_proof_inventory_26
2022-07-28T15:20:44.205000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20220728_151710/abc_p2p_proof_inventory_26/test_framework.log
2022-07-28T15:20:44.205000Z TestFramework (ERROR): 
2022-07-28T15:20:44.205000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-debug/test/tmp/test_runner_₿₵_  _20220728_151710/abc_p2p_proof_inventory_26' to consolidate all logs
2022-07-28T15:20:44.205000Z TestFramework (ERROR): 
2022-07-28T15:20:44.205000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2022-07-28T15:20:44.206000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2022-07-28T15:20:44.206000Z TestFramework (ERROR):

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

This revision is now accepted and ready to land.Jul 28 2022, 15:59
This revision was landed with ongoing or failed builds.Jul 28 2022, 20:25
This revision was automatically updated to reflect the committed changes.