Unverified Commit 099f1162 authored by Jia Hao's avatar Jia Hao Committed by GitHub

[integration_test] Don't log exceptions twice (#81812)

parent 783e1dd2
...@@ -8,8 +8,9 @@ When the exception was thrown, this was the stack: ...@@ -8,8 +8,9 @@ When the exception was thrown, this was the stack:
<<skip until matching line>> <<skip until matching line>>
The test description was: The test description was:
Exception handling in test harness - string Exception handling in test harness - string
<<skip until matching line>> ════════════════════════════════════════════════════════════════════════════════════════════════════
Test failed\. See exception logs above\. \d\d:\d\d \+0 -1: Exception handling in test harness - string \[E\]
Test failed. See exception logs above.
The test description was: Exception handling in test harness - string The test description was: Exception handling in test harness - string
<<skip until matching line>> <<skip until matching line>>
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
...@@ -20,9 +21,10 @@ When the exception was thrown, this was the stack: ...@@ -20,9 +21,10 @@ When the exception was thrown, this was the stack:
#0 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]integration_test[/\\]exception_handling_test\.dart:13:5\) #0 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]integration_test[/\\]exception_handling_test\.dart:13:5\)
<<skip until matching line>> <<skip until matching line>>
The test description was: The test description was:
Exception handling in test harness - FlutterError Exception handling in test harness - FlutterError
<<skip until matching line>> ════════════════════════════════════════════════════════════════════════════════════════════════════
Test failed\. See exception logs above\. \d\d:\d\d \+0 -2: Exception handling in test harness - FlutterError \[E\]
Test failed. See exception logs above.
The test description was: Exception handling in test harness - FlutterError The test description was: Exception handling in test harness - FlutterError
<<skip until matching line>> <<skip until matching line>>
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════ ══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
...@@ -33,9 +35,11 @@ When the exception was thrown, this was the stack: ...@@ -33,9 +35,11 @@ When the exception was thrown, this was the stack:
#2 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]integration_test[/\\]exception_handling_test\.dart:16:5\) #2 main.<anonymous closure> \(.+[/\\]dev[/\\]automated_tests[/\\]integration_test[/\\]exception_handling_test\.dart:16:5\)
<<skip until matching line>> <<skip until matching line>>
The test description was: The test description was:
Exception handling in test harness - uncaught Future error Exception handling in test harness - uncaught Future error
<<skip until matching line>> ════════════════════════════════════════════════════════════════════════════════════════════════════
Test failed\. See exception logs above\. \d\d:\d\d \+0 -3: Exception handling in test harness - uncaught Future error \[E\]
Test failed. See exception logs above.
The test description was: Exception handling in test harness - uncaught Future error The test description was: Exception handling in test harness - uncaught Future error
.*(TODO\(jiahaog\): Remove the next line once https://github.com/flutter/flutter/issues/81521 is fixed)?
<<skip until matching line>> <<skip until matching line>>
.*..:.. \+0 -3: Some tests failed\. * .*..:.. \+0 -3: Some tests failed\. *
...@@ -365,4 +365,19 @@ https://flutter.dev/docs/testing/integration-tests#testing-on-firebase-test-lab ...@@ -365,4 +365,19 @@ https://flutter.dev/docs/testing/integration-tests#testing-on-firebase-test-lab
// TODO(jiahaog): Remove when https://github.com/flutter/flutter/issues/66006 is fixed. // TODO(jiahaog): Remove when https://github.com/flutter/flutter/issues/66006 is fixed.
super.attachRootWidget(RepaintBoundary(child: rootWidget)); super.attachRootWidget(RepaintBoundary(child: rootWidget));
} }
@override
void reportExceptionNoticed(FlutterErrorDetails exception) {
// This method is called to log errors as they happen, and they will also
// be eventually logged again at the end of the tests. The superclass
// behavior is specific to the "live" execution semantics of
// [LiveTestWidgetsFlutterBinding] so users don't have to wait until tests
// finish to see the stack traces.
//
// Disable this because Integration Tests follow the semantics of
// [AutomatedTestWidgetsFlutterBinding] that does not log the stack traces
// live, and avoids the doubly logged stack trace.
// TODO(jiahaog): Integration test binding should not inherit from
// `LiveTestWidgetsFlutterBinding` https://github.com/flutter/flutter/issues/81534
}
} }
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