Unverified Commit 54236427 authored by Greg Spencer's avatar Greg Spencer Committed by GitHub

Fix flake in logger_test (#22095)

This fixes a flaky test where it included 0ms as part of an output check. Kind of a classic flaky test.
parent 72d86f90
......@@ -281,11 +281,9 @@ void main() {
testUsingContext('sequential startProgress calls with StdoutLogger', () async {
context[Logger].startProgress('AAA')..stop();
context[Logger].startProgress('BBB')..stop();
expect(outputStdout(), <String>[
'AAA 0ms',
'BBB 0ms',
'',
]);
expect(outputStdout().length, equals(3));
expect(outputStdout()[0], matches(RegExp(r'AAA[ ]{60}[\d ]{3}[\d]ms')));
expect(outputStdout()[1], matches(RegExp(r'BBB[ ]{60}[\d ]{3}[\d]ms')));
}, overrides: <Type, Generator>{
Stdio: () => mockStdio,
Logger: () => StdoutLogger()..supportsColor = false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment