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() { ...@@ -281,11 +281,9 @@ void main() {
testUsingContext('sequential startProgress calls with StdoutLogger', () async { testUsingContext('sequential startProgress calls with StdoutLogger', () async {
context[Logger].startProgress('AAA')..stop(); context[Logger].startProgress('AAA')..stop();
context[Logger].startProgress('BBB')..stop(); context[Logger].startProgress('BBB')..stop();
expect(outputStdout(), <String>[ expect(outputStdout().length, equals(3));
'AAA 0ms', expect(outputStdout()[0], matches(RegExp(r'AAA[ ]{60}[\d ]{3}[\d]ms')));
'BBB 0ms', expect(outputStdout()[1], matches(RegExp(r'BBB[ ]{60}[\d ]{3}[\d]ms')));
'',
]);
}, overrides: <Type, Generator>{ }, overrides: <Type, Generator>{
Stdio: () => mockStdio, Stdio: () => mockStdio,
Logger: () => StdoutLogger()..supportsColor = false, 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