It tends to be flacky because the loop tend to take too long to run when the system is uner load. This bails the loop when it took too long instead of failing the test.
Details
Details
- Reviewers
jasonbcox Fabien - Group Reviewers
Restricted Project - Commits
- rSTAGING8fb2d6add9a1: Improve reliability of avalanche test
rABC8fb2d6add9a1: Improve reliability of avalanche test
Run the test multiple times in parallel.
Diff Detail
Diff Detail
- Repository
- rABC Bitcoin ABC
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
src/test/avalanche_tests.cpp | ||
---|---|---|
637 ↗ | (On Diff #11247) | This can theoretically infinite-loop if something goes wrong. Something like this will be more robust and still retain the retry mechanism that you added: for (int i = 0; i < maxTries; i++) { if (maxTries * timeout > std::chrono::seconds(10)) { throw ... } // Something is clearly wrong if maxTries gets too big. I used a timescale here to help pick a sane value for "too big". ... if (...) { maxTries++; } |
646 ↗ | (On Diff #11247) | use timeout here |