Fix flaky editor beatmap creation test #24935
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Came up as a failure when locally running tests for ppy/osu-framework#6001 - but the test is actually a previously-known flaky that I couldn't reproduce the failure of until testing the aforementioned PR.
This appears to be a simple race; the test scene queries the track length from update thread, but the length is actually set on the audio thread. So it's not unreasonable that given unlucky timing, the length will not be set by
TrackBass
before it is queried.To fix, switch assert to until step. I'm generally not really willing to give this more time of day until this change is proven insufficient.