Page MenuHomePhabricator

[tests] Fix network threading in functional tests

Authored by Fabien on Tue, Jan 22, 14:42.


Summary,, and
abc-p2p-compactblocks add p2p_connections after the
NetworkThread has been started. This isn't permitted.
Fix test to restart the network thread when adding new connections.

Add assertions to ensure new tests won't fail into this issue. had a potential race condition if the NetworkThread
hadn't terminated by the time we tried to restart it.

Partial backport of core PR11849
commits 5c8ff26 and 34e08b3

Depends on D2383

Test Plan
./test/functional/ --extended

Diff Detail

rABC Bitcoin ABC
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Tue, Jan 22, 14:42
Herald added a reviewer: Restricted Project. · View Herald TranscriptTue, Jan 22, 14:42
Herald added a subscriber: schancel. · View Herald Transcript
jasonbcox accepted this revision.Tue, Jan 22, 18:25
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
480 ↗(On Diff #6814)

Pretty sure this change is already in the previous diff. That shouldn't affect your merging, so this should be ok.

This revision is now accepted and ready to land.Tue, Jan 22, 18:25
Closed by commit rABCc983a34d24cf: [tests] Fix network threading in functional tests (authored by John Newbery <>, committed by Fabien). · Explain WhyTue, Jan 22, 18:43
This revision was automatically updated to reflect the committed changes.