From 0d73eb3dd91b5b34bb6c38a25a4e6aac411d38f3 Mon Sep 17 00:00:00 2001 From: David Sherret Date: Mon, 18 Jul 2022 13:20:15 -0400 Subject: [PATCH] chore: fix flaky captured_output (#15234) --- cli/tests/integration/test_tests.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cli/tests/integration/test_tests.rs b/cli/tests/integration/test_tests.rs index e1c7700db7..8e7df2dfbc 100644 --- a/cli/tests/integration/test_tests.rs +++ b/cli/tests/integration/test_tests.rs @@ -351,7 +351,12 @@ fn captured_output() { let output_text = String::from_utf8(output.stdout).unwrap(); let start = output_text.find(output_start).unwrap() + output_start.len(); let end = output_text.find(output_end).unwrap(); - let output_text = output_text[start..end].trim(); + // replace zero width space that may appear in test output due + // to test runner output flusher + let output_text = output_text[start..end] + .replace('\u{200B}', "") + .trim() + .to_string(); let mut lines = output_text.lines().collect::>(); // the output is racy on either stdout or stderr being flushed // from the runtime into the rust code, so sort it... the main