HomePhabricator

[avalanche] Fix race condition during destruction in poll_and_response test

Description

[avalanche] Fix race condition during destruction in poll_and_response test

Summary: Previously, the Processor would be destroyed at the end of the test execution, but the callback thread would still be running, possibly calling into a destroyed Processor. To solve this problem, we move the Processor ownership to the test framework.

Test Plan:

ninja all check-avalanche

Run it multiple time to ensure the race is gone.

Reviewers: #bitcoin_abc, majcosta

Reviewed By: #bitcoin_abc, majcosta

Differential Revision: https://reviews.bitcoinabc.org/D8603

Details

Provenance
deadalnixAuthored on Dec 4 2020, 01:25
deadalnixPushed on Dec 4 2020, 15:23
Reviewer
Restricted Project
Differential Revision
D8603: [avalanche] Fix race condition during destruction in poll_and_response test
Parents
rABCf0a9f67f8329: [CashTab] Add Fbt dependencies, init script and intl to App component
Branches
Unknown
Tags
Unknown