Page MenuHomePhabricator

[avalanche] Extract the facilities to the test object to simplify the abc_p2p_avalanche_proof_voting test
ClosedPublic

Authored by Fabien on Feb 11 2022, 21:12.

Details

Summary

This is a step toward splitting the test into pieces so we don't have the various cases scattered over files with redundant content.

Test Plan
./test/functional/test_runner.py abc_p2p_avalanche_proof_voting

Diff Detail

Repository
rABC Bitcoin ABC
Branch
avalanche_extract_test_facilities
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 18254
Build 36316: Build Diffbuild-debug · build-diff · build-clang · build-without-wallet · build-clang-tidy
Build 36315: arc lint + arc unit

Event Timeline

Fabien requested review of this revision.Feb 11 2022, 21:12
PiRK added a subscriber: PiRK.

Good refactoring overalL. I have added a few non-blocking improvement suggestions.

test/functional/abc_p2p_avalanche_proof_voting.py
81

this could be a @staticmethod

93

If quorum_proof is to be used only in get_quorum, I would pass is as a parameter and not add another class attribute.

This revision is now accepted and ready to land.Feb 14 2022, 14:53
test/functional/abc_p2p_avalanche_proof_voting.py
81

OK

93

I'm not sold on this, I just find it easy enough to have it a class attribute rather than passing it down each case that needs it because it rebuilds the quorum.