From e7b8a98e8ef435819a3a77f75a58c64d5e65f51c Mon Sep 17 00:00:00 2001 From: Ayaz Hafiz Date: Wed, 27 Sep 2023 15:07:43 -0500 Subject: [PATCH] Fix a flakey test Expecting stdout/stderr to be present at the exact time a test fails is flakey, so avoid the test flakiness. --- .../generic_test_runner/tests/simulation.rs | 25 +++---------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/crates/abq_runners/generic_test_runner/tests/simulation.rs b/crates/abq_runners/generic_test_runner/tests/simulation.rs index 62225f7c..df0d7b25 100644 --- a/crates/abq_runners/generic_test_runner/tests/simulation.rs +++ b/crates/abq_runners/generic_test_runner/tests/simulation.rs @@ -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 - - - - 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." + )); } }