Repository navigation
fix: don't overwrite recordings saved in the same second - #318
Merged
Merged
Conversation
Contributor
|
also resolves this issue: #219 (comment) |
FalkWoldmann
force-pushed
the
fix-recording-doctest-race
branch
from
September 30, 2026 19:44
4eab6b8 to
af312d8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Recording::save_tonames files<scenario>_<unix seconds>.yamland opened them withFile::create, so two saves of the same scenario within a second overwrote each other. Therecord,playbackandplayback_asyncdoctests all savemy_test_scenarioand run in parallel, so one could read a file another was rewriting and panic with "Cannot deserialize mock server response". That's the flaky Test (all-features) failure seen on #317.The file is now created with
File::create_new; if the name is taken, a counter is appended (<scenario>_<ts>_1.yaml, ...). The usual filename is unchanged.Added a test that saves the same scenario twice; it fails without the fix. The full doctest run passed 5 times in a row with
--features standalone, which failed on the first try before.Closes #219