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:
committed by
GitHub
parent
394269f9ea
commit
77651bc496
@@ -346,7 +346,26 @@ Future<void> _runTestHarnessTests() async {
|
||||
: 'Failed to find the stack trace for the pending Timer.\n\n'
|
||||
'stdout:\n${result.flattenedStdout}\n\n'
|
||||
'stderr:\n${result.flattenedStderr}';
|
||||
}),
|
||||
},
|
||||
),
|
||||
() => _runFlutterTest(
|
||||
automatedTests,
|
||||
script: path.join('test_smoke_test', 'fail_test_on_exception_after_test.dart'),
|
||||
expectFailure: true,
|
||||
printOutput: false,
|
||||
outputChecker: (CommandResult result) {
|
||||
const String expectedError = '══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════\n'
|
||||
'The following StateError was thrown running a test (but after the test had completed):\n'
|
||||
'Bad state: Exception thrown after test completed.';
|
||||
if (result.flattenedStdout!.contains(expectedError)) {
|
||||
return null;
|
||||
}
|
||||
return 'Failed to find expected output on stdout.\n\n'
|
||||
'Expected output:\n$expectedError\n\n'
|
||||
'Actual stdout:\n${result.flattenedStdout}\n\n'
|
||||
'Actual stderr:\n${result.flattenedStderr}';
|
||||
},
|
||||
),
|
||||
() => _runFlutterTest(
|
||||
automatedTests,
|
||||
script: path.join('test_smoke_test', 'crash1_test.dart'),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user