Reland "Fail tests on exceptions raised after test completed (#144706)" (#144980)

Reverts flutter/flutter#144970

No changes in this PR compared to the original. The test failure was fixed by adding missing awaits in https://github.com/flutter/flutter/pull/144978.

Fixes https://github.com/flutter/flutter/issues/144353.
This commit is contained in:
Michael Goderbauer
2024-03-12 11:17:10 -07:00
committed by GitHub
parent 394269f9ea
commit 77651bc496
4 changed files with 54 additions and 7 deletions

View File

@@ -128,13 +128,13 @@ void main() {
<String, String>{'SHARD': kTestHarnessShardName, 'SUBSHARD': '1_3'},
);
expectExitCode(result, 0);
expect(result.stdout, contains('Selecting subshard 1 of 3 (tests 1-3 of 8)'));
expect(result.stdout, contains('Selecting subshard 1 of 3 (tests 1-3 of 9)'));
result = await runScript(
<String, String>{'SHARD': kTestHarnessShardName, 'SUBSHARD': '3_3'},
);
expectExitCode(result, 0);
expect(result.stdout, contains('Selecting subshard 3 of 3 (tests 7-8 of 8)'));
expect(result.stdout, contains('Selecting subshard 3 of 3 (tests 7-9 of 9)'));
});
test('exits with code 1 when SUBSHARD index greater than total', () async {