Unverified Commit 93705691 authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

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
parent c3248b79
...@@ -37,9 +37,8 @@ void main() { ...@@ -37,9 +37,8 @@ void main() {
testUsingContext('can hot reload', () async { testUsingContext('can hot reload', () async {
await _flutterRun.run(withDebugger: true); await _flutterRun.run(withDebugger: true);
await _flutterAttach.attach(_flutterRun.vmServicePort); await _flutterAttach.attach(_flutterRun.vmServicePort);
await _flutterAttach.hotReload(); 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); }, timeout: const Timeout.factor(3), skip: platform.isWindows);
} }
...@@ -33,41 +33,19 @@ void main() { ...@@ -33,41 +33,19 @@ void main() {
test('works without error', () async { test('works without error', () async {
await _flutter.run(); await _flutter.run();
await _flutter.hotReload();
// Due to https://github.com/flutter/flutter/issues/17833 this will // TODO(dantup): Unskip after https://github.com/flutter/flutter/issues/17833.
// throw on Windows. If you merge a fix for this and this test starts failing }, skip: platform.isWindows);
// 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,
);
});
test('hits breakpoints with file:// prefixes after reload', () async { test('hits breakpoints with file:// prefixes after reload', () async {
await _flutter.run(withDebugger: true); await _flutter.run(withDebugger: true);
// This test fails due to // https://github.com/flutter/flutter/issues/18441 // Hit breakpoint using a file:// URI.
// If you merge a fix for this and the test starts failing because it's not final VMIsolate isolate = await _flutter.breakAt(
// throwing, delete the wrapping expect/return below. new Uri.file(_project.breakpointFile).toString(),
// (dantup) _project.breakpointLine);
// expect(isolate.pauseEvent, const isInstanceOf<VMPauseBreakpointEvent>());
// final VMIsolate isolate = await _flutter.breakAt( // TODO(dantup): Unskip after https://github.com/flutter/flutter/issues/18441.
// new Uri.file(_project.breakpointFile).toString(), }, skip: !platform.isLinux);
// _project.breakpointLine
// );
// expect(isolate.pauseEvent, const isInstanceOf<VMPauseBreakpointEvent>());
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<VMPauseBreakpointEvent>());
}(), platform.isLinux ? completes : throwsA(anything)
);
});
}, timeout: const Timeout.factor(3)); }, timeout: const Timeout.factor(3));
} }
...@@ -44,6 +44,6 @@ void main() { ...@@ -44,6 +44,6 @@ void main() {
await new Future<void>.delayed(requiredLifespan); await new Future<void>.delayed(requiredLifespan);
expect(_flutter.hasExited, equals(false)); 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); }, timeout: const Timeout.factor(3), skip: platform.isWindows);
} }
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