test: Fix flaky subscribe tests - #6510
Conversation
b4a4566 to
2dcbc95
Compare
|
CI failed after running tests 15 times in debug with code coverage. But the other test turned out to be flaky: https://github.com/XRPLF/rippled/actions/runs/22867192993/job/66337167696#step:20:52692 I've added a fix for that. Let's see how it goes now. |
|
With the fix for Let's try again. |
|
Operation got cancelled in CI. But it've run tests successfully 11 more times. So I think the fix is fine. Overall we have:
I think this should be enough to say that both fixes are good. |
7ff6b41 to
968c155
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6510 +/- ##
=========================================
- Coverage 79.8% 79.8% -0.0%
=========================================
Files 862 862
Lines 67883 67883
Branches 7551 7549 -2
=========================================
- Hits 54199 54196 -3
- Misses 13684 13687 +3 🚀 New features to boost your workflow:
|
a1q123456
left a comment
There was a problem hiding this comment.
It's an attempt anyway so it's fine as long as we don't try to cover the issue. i.e. skip the checks if we receive no message. Also I did want to test if NPROC is contributing to the issue. Let's see if things are improved!
0ffa880 to
0fcd01b
Compare
0fcd01b to
b6b0dce
Compare
Subscribe tests have a problem that there is no way to synchronize application running in background threads and test threads. Threads are communicating via websocket messages. When the code is compiled in debug mode with code coverage enabled it executes quite slow, so receiving websocket messages by the client in subscribe tests may time out. This change does 2 things to fix the problem: * Increases timeout for receiving a websocket message. * Decreases the number of tests running in parallel. While testing the fix for subscribe test another flaky test in ledger replay was found, which has also been addressed.
High Level Overview of Change
This PR hopefully fixes flaky Subscribe tests.
Fixes #6399.
Context of Change
Subscribe tests have a problem that there is no way to synchronise application running in background threads and test's thread. Threads are communicating by websocket messages. When the code is compiled in debug mode with code coverage it executes quite slow, so receiving websocket messages by the client in subscribe tests may time out.
This fix does 2 things to fix the problem:
While testing the fix for subscribe test another flaky test in ledger replay was found. I left a comment in the test describing what was wrong in the flaky ledger replay test.
Type of Change
.gitignore, formatting, dropping support for older tooling)API Impact
libxrplchange (any change that may affectlibxrplor dependents oflibxrpl)