Page MenuHomePhabricator

[avalanche] Fix race condition during destruction in poll_and_response test
ClosedPublic

Authored by deadalnix on Dec 4 2020, 01:46.

Details

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.

Diff Detail

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