Skip to content

Commit 73a3c38

Browse files
authored
chore: fix flaky WidgetsBindingObserver test (#3066)
* Fix flaky test * Update
1 parent 46e04c8 commit 73a3c38

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

flutter/test/widgets_binding_observer_test.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import 'dart:ui';
44

5+
import 'package:flutter/foundation.dart';
56
import 'package:flutter/services.dart';
67
import 'package:flutter_test/flutter_test.dart';
78
import 'package:mockito/mockito.dart';
@@ -104,7 +105,7 @@ void main() {
104105
});
105106

106107
testWidgets(
107-
'when app lifecycle tracing enabled is enabled, only inactive and resumed are tracked',
108+
'on supported platforms when app lifecycle tracing enabled is enabled, only inactive and resumed are tracked',
108109
(WidgetTester tester) async {
109110
flutterTrackingDisabledOptions.platform = MockPlatform(isWeb: false);
110111
flutterTrackingDisabledOptions.appInBackgroundTracingThreshold =
@@ -128,7 +129,7 @@ void main() {
128129
await sendLifecycle('resumed');
129130

130131
verify(hub.generateNewTraceId()).called(1);
131-
});
132+
}, skip: kIsWeb);
132133

133134
testWidgets('memory pressure breadcrumb', (WidgetTester tester) async {
134135
final hub = MockHub();

0 commit comments

Comments
 (0)