Repository navigation
Conversation
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.
feat: wait for the stack under test before playing the bag
The recorder, the test's launch and the player all started at the same instant,
so on a short fixture the bag could finish before the nodes under test existed.
The run was then recorded without the very topics the test exists to capture,
and it surfaced as an empty analyze rather than as a startup race. Playback now
waits for the stack to come up first.
Found while building a replay test whose fixture is under a second, along with
three other things that only show up on a real bag.
wait_for_stack— a gate process, on by default, that holds the playeruntil either every expected output topic has a publisher, or something
subscribes to
/clock. The second condition is what makes it work: a node onsim time creates nothing until
/clockarrives, and/clockonly arriveswith the player, so waiting on its outputs deadlocks against the very thing
being gated.
--output-dir— results were written to the system temp directory andlost on restart. Also exported as
REPLAY_TESTING_OUTPUT_DIRso a test canput its own artifacts with the run. Fixes a related bug:
os.access()isfalse for a path that does not exist yet, so the write-permission probe
silently redirected every run to
./test_results.rosbag2_pyreaders cannot be rewound,so one shared reader left every test after the first reading an empty bag.
carry nothing. Missing topics still raise; a declared but silent topic is now
reported and the run continues.
RegeneratedSource/ReplaySourcePlan— a helper for inputs a bagcannot supply as recorded. A test declares each case once, with its reason,
and derives the required topics, what to strip, and the launch flags.
Tests: 32, including 4 for the gate and 14 for the source plan.
Migration Guide
Nothing to change for an existing test, with one exception.
The gate is on by default and waits up to 30 s. A test whose stack neither
publishes its declared outputs nor subscribes to
/clockwill now spend thattimeout before playback, then carry on with a warning. If that is your case:
wait_for_stack_timeout(30.0) andwait_for_stack_grace(2.0) are alsoavailable.
To keep results somewhere durable: