Page MenuHomePhabricator

Fix rpc_blockchain flakiness
ClosedPublic

Authored by Fabien on Nov 9 2022, 13:09.

Details

Reviewers
PiRK
Group Reviewers
Restricted Project
Commits
rABC45aefa144a64: Fix rpc_blockchain flakiness
Summary

The test use an assertion that a key doesn't exist: assert 'fee' not in block['tx'][1] when the verbosity level is 1. This expected to work because with this verbosity level, the output is an array of txid and not a dict, so the key cannot be found. Except that fee is a valid hexadecimal value, and nothing prevents the txid from having this string.

Test Plan
for i in {1..100}; do ./test/functional/test_runner.py rpc_blockchain || break; done

Diff Detail

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

Event Timeline

Fabien requested review of this revision.Nov 9 2022, 13:09
PiRK requested changes to this revision.Nov 9 2022, 13:58
PiRK added a subscriber: PiRK.
PiRK added inline comments.
test/functional/rpc_blockchain.py
467 ↗(On Diff #36192)

the logging is now incorrect for this casz

This revision now requires changes to proceed.Nov 9 2022, 13:58

Update the comment and improve the test to check the actual txid

This revision is now accepted and ready to land.Nov 9 2022, 15:41
This revision was automatically updated to reflect the committed changes.