From d402d40aa64543cba5361c29ace4f8bd79a8b7f0 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Thu, 2 Nov 2017 12:19:43 -0700 Subject: [PATCH] Up a timeout to reduce the number of flakes. (#12837) --- packages/flutter_tools/lib/src/test/flutter_platform.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/test/flutter_platform.dart b/packages/flutter_tools/lib/src/test/flutter_platform.dart index d7a2f9a989..21630ea68a 100644 --- a/packages/flutter_tools/lib/src/test/flutter_platform.dart +++ b/packages/flutter_tools/lib/src/test/flutter_platform.dart @@ -22,7 +22,7 @@ import 'watcher.dart'; /// The timeout we give the test process to connect to the test harness /// once the process has entered its main method. -const Duration _kTestStartupTimeout = const Duration(seconds: 5); +const Duration _kTestStartupTimeout = const Duration(minutes: 1); /// The timeout we give the test process to start executing Dart code. When the /// CPU is under severe load, this can take a while, but it's not indicative of @@ -274,6 +274,9 @@ class _FlutterPlatform extends PlatformPlugin { await controller.sink.done; break; case _InitialResult.timedOut: + // Could happen either if the process takes a long time starting + // (_kTestProcessTimeout), or if once Dart code starts running, it takes a + // long time to open the WebSocket connection (_kTestStartupTimeout). printTrace('test $ourTestCount: timed out waiting for process with pid ${process.pid} to connect to test harness'); final String message = _getErrorMessage('Test never connected to test harness.', testPath, shellPath); controller.sink.addError(message);