Skip to content

Commit

Permalink
Fix a flakey test
Browse files Browse the repository at this point in the history
Expecting stdout/stderr to be present at the exact time a test fails is
flakey, so avoid the test flakiness.
  • Loading branch information
ayazhafiz committed Sep 27, 2023
1 parent 41d49ab commit e7b8a98
Showing 1 changed file with 4 additions and 21 deletions.
25 changes: 4 additions & 21 deletions crates/abq_runners/generic_test_runner/tests/simulation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -674,27 +674,10 @@ fn native_runner_fails_while_executing_tests() {
let output = results[0].output.as_ref().unwrap();
let output = sanitize_output(output);

insta::assert_snapshot!(output, @r###"
-- Unexpected Test Runner Failure --
The test command
<simulation cmd>
stopped communicating with its abq worker before completing all test requests.
Here's the standard output/error we found for the failing command.
Stdout:
I failed catastrophically
Stderr:
For a reason explainable only by a backtrace
Please see worker 0, runner X for more details.
"###);
assert!(output.contains("-- Unexpected Test Runner Failure --"));
assert!(output.contains(
"stopped communicating with its abq worker before completing all test requests."
));
}
}

Expand Down

0 comments on commit e7b8a98

Please sign in to comment.