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
- Branch
- avatest
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 7424 Build 12891: Bitcoin ABC Buildbot (legacy) Build 12890: arc lint + arc unit
Event Timeline
src/test/avalanche_tests.cpp | ||
---|---|---|
637 | 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 | use timeout here |