From 93705691a4287ffa1d2e45b650f68ee9a8be872a Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Wed, 1 Aug 2018 17:50:38 +0100 Subject: [PATCH] Skip tests that are expected to fail with timeouts (#20074) * Skip tests instead of expecting failure, because expected failure = timeout which is slow Some of these tests are known to fail and were coded to expect it; however because the failure is a timeout it's just dragging out test runs (shortening timeouts will make the tests flakier). * Make it easier to find skipped tests * Change SKIP to TODO --- .../test/integration/flutter_attach_test.dart | 3 +- .../test/integration/hot_reload_test.dart | 42 +++++-------------- .../test/integration/lifetime_test.dart | 2 +- 3 files changed, 12 insertions(+), 35 deletions(-) diff --git a/packages/flutter_tools/test/integration/flutter_attach_test.dart b/packages/flutter_tools/test/integration/flutter_attach_test.dart index 213aa96815..fe1a410a45 100644 --- a/packages/flutter_tools/test/integration/flutter_attach_test.dart +++ b/packages/flutter_tools/test/integration/flutter_attach_test.dart @@ -37,9 +37,8 @@ void main() { testUsingContext('can hot reload', () async { await _flutterRun.run(withDebugger: true); await _flutterAttach.attach(_flutterRun.vmServicePort); - await _flutterAttach.hotReload(); }); - // Skip on Windows due to https://github.com/flutter/flutter/issues/17833 + // TODO(dantup): Unskip after https://github.com/flutter/flutter/issues/17833. }, timeout: const Timeout.factor(3), skip: platform.isWindows); } diff --git a/packages/flutter_tools/test/integration/hot_reload_test.dart b/packages/flutter_tools/test/integration/hot_reload_test.dart index 39d6639640..7c869e90ce 100644 --- a/packages/flutter_tools/test/integration/hot_reload_test.dart +++ b/packages/flutter_tools/test/integration/hot_reload_test.dart @@ -33,41 +33,19 @@ void main() { test('works without error', () async { await _flutter.run(); - - // Due to https://github.com/flutter/flutter/issues/17833 this will - // throw on Windows. If you merge a fix for this and this test starts failing - // because it didn't throw on Windows, you should delete the wrapping expect() - // and just `await` the hotReload directly - // (dantup) - - await expectLater( - _flutter.hotReload(), - platform.isWindows ? throwsA(anything) : completes, - ); - }); + await _flutter.hotReload(); + // TODO(dantup): Unskip after https://github.com/flutter/flutter/issues/17833. + }, skip: platform.isWindows); test('hits breakpoints with file:// prefixes after reload', () async { await _flutter.run(withDebugger: true); - // This test fails due to // https://github.com/flutter/flutter/issues/18441 - // If you merge a fix for this and the test starts failing because it's not - // throwing, delete the wrapping expect/return below. - // (dantup) - // - // final VMIsolate isolate = await _flutter.breakAt( - // new Uri.file(_project.breakpointFile).toString(), - // _project.breakpointLine - // ); - // expect(isolate.pauseEvent, const isInstanceOf()); - await expectLater(() async { - // Hit breakpoint using a file:// URI. - final VMIsolate isolate = await _flutter.breakAt( - new Uri.file(_project.breakpointFile).toString(), - _project.breakpointLine - ); - expect(isolate.pauseEvent, const isInstanceOf()); - }(), platform.isLinux ? completes : throwsA(anything) - ); - }); + // Hit breakpoint using a file:// URI. + final VMIsolate isolate = await _flutter.breakAt( + new Uri.file(_project.breakpointFile).toString(), + _project.breakpointLine); + expect(isolate.pauseEvent, const isInstanceOf()); + // TODO(dantup): Unskip after https://github.com/flutter/flutter/issues/18441. + }, skip: !platform.isLinux); }, timeout: const Timeout.factor(3)); } diff --git a/packages/flutter_tools/test/integration/lifetime_test.dart b/packages/flutter_tools/test/integration/lifetime_test.dart index e8f1d01a54..cfdafc931f 100644 --- a/packages/flutter_tools/test/integration/lifetime_test.dart +++ b/packages/flutter_tools/test/integration/lifetime_test.dart @@ -44,6 +44,6 @@ void main() { await new Future.delayed(requiredLifespan); expect(_flutter.hasExited, equals(false)); }); - // Skip on Windows due to https://github.com/flutter/flutter/issues/17833 + // TODO(dantup): Unskip after https://github.com/flutter/flutter/issues/17833. }, timeout: const Timeout.factor(3), skip: platform.isWindows); }