-
Notifications
You must be signed in to change notification settings - Fork 2.6k
sp-runtime-interface-test: Fix flaky test #13770
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ran it 5 times in parallel on Thread 1 with 1000 reps and no failure. But also no on master…
PS: Will re-test with release.
Why the test was failing if run in parallel with other tests within single process? |
It should be |
Yes that seems to cause it. Running on one thread is fine, but on multiple it errors: |
I played with this a little. Seems that duplicating this line:
works around the problem. The span also always contains 4 elements:
Without duplication the content seems to be random. Does it look like some race-condition in registering the subscriber? If it is then we have hidden problem somewhere. Maybe not important, idk... |
One more observation: on my local computer only this pair of tests is causing failures (50%):
|
Yes this is the problem. I should have made the comment more "extended"
This stuff is already tracked upstream tokio-rs/tracing#2436 tokio-rs/tracing#2411 We register the subcriber in a node early enough, at least I hope :D substrate/client/cli/src/config.rs Lines 632 to 649 in 53f5bef
|
No description provided.