From 8da98105b463f9855052bddd8094a42ee7f9460a Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 4 May 2016 13:42:29 -0700 Subject: [PATCH] Skip the gallery smoke test (#3736) This test hangs occationally on the bots and the bots aren't smart enough to recover, which means the whole project gets blocked. Filed #3735 about the hang. --- examples/material_gallery/test/smoke_test.dart | 2 +- packages/flutter_test/lib/src/widget_tester.dart | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/examples/material_gallery/test/smoke_test.dart b/examples/material_gallery/test/smoke_test.dart index 5ab6380fa9..d2ab42ec2a 100644 --- a/examples/material_gallery/test/smoke_test.dart +++ b/examples/material_gallery/test/smoke_test.dart @@ -94,5 +94,5 @@ void main() { tester.tap(find.text('Light')); tester.pump(); tester.pump(const Duration(seconds: 1)); // Wait until it's changed. - }); + }, skip: true); } diff --git a/packages/flutter_test/lib/src/widget_tester.dart b/packages/flutter_test/lib/src/widget_tester.dart index 64fadead74..784facae67 100644 --- a/packages/flutter_test/lib/src/widget_tester.dart +++ b/packages/flutter_test/lib/src/widget_tester.dart @@ -36,13 +36,14 @@ typedef Future WidgetTesterCallback(WidgetTester widgetTester); /// expect(tester, hasWidget(find.text('Success'))); /// }); void testWidgets(String description, WidgetTesterCallback callback, { - Timeout timeout: const Timeout(const Duration(seconds: 5)) + Timeout timeout: const Timeout(const Duration(seconds: 5)), + bool skip }) { TestWidgetsFlutterBinding binding = TestWidgetsFlutterBinding.ensureInitialized(); WidgetTester tester = new WidgetTester._(binding); group('-', () { setUp(binding.preTest); - test(description, () => binding.runTest(() => callback(tester))); + test(description, () => binding.runTest(() => callback(tester)), skip: skip); tearDown(binding.postTest); }, timeout: timeout); }