Flutter_tools for web: report error messages with stacks on exit (#87386)
* Flutter_tools for web platform: report error messages with stacks on toolExit Print error messages and stacks in verbose mode before calling `throwToolExit` on communication errors to chrome and dwds. This will help us disagnose CI flakes: Helps: https://github.com/flutter/flutter/issues/84012 Closes: https://github.com/flutter/flutter/issues/87149 * Added tests * Extend timeout for testing failure to connect to chrome * Update rest of chrome tests to await until matching is finished
This commit is contained in:
@@ -124,6 +124,15 @@ Future<void> expectToolExitLater(Future<dynamic> future, Matcher messageMatcher)
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> expectReturnsNormallyLater(Future<dynamic> future) async {
|
||||
try {
|
||||
await future;
|
||||
// Catch all exceptions to give a better test failure message.
|
||||
} catch (e, trace) { // ignore: avoid_catches_without_on_clauses
|
||||
fail('Expected to run with no exceptions, got $e\n$trace');
|
||||
}
|
||||
}
|
||||
|
||||
Matcher containsIgnoringWhitespace(String toSearch) {
|
||||
return predicate(
|
||||
(String source) {
|
||||
|
||||
Reference in New Issue
Block a user