From 3158d8572b828223f40dec4feba380c35256b77c Mon Sep 17 00:00:00 2001 From: Danny Tuppeny Date: Thu, 28 Jun 2018 08:54:02 +0100 Subject: [PATCH] Add process output for flutter_tester test and unskip (#18899) * Add process output for flutter_tester test and unskip * Add a comment about this potential flake --- .../test/integration/flutter_tester_test.dart | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/packages/flutter_tools/test/integration/flutter_tester_test.dart b/packages/flutter_tools/test/integration/flutter_tester_test.dart index b4a06e76f3..c429cb344e 100644 --- a/packages/flutter_tools/test/integration/flutter_tester_test.dart +++ b/packages/flutter_tools/test/integration/flutter_tester_test.dart @@ -97,15 +97,25 @@ class MyApp extends StatelessWidget { } '''); + // Capture process output so that if the process quits we can print the + // stdout/stderr in the error. + final StringBuffer logs = new StringBuffer(); + device.getLogReader().logLines.listen(logs.write); + final LaunchResult result = await start(mainPath); expect(result.started, isTrue); expect(result.observatoryUri, isNotNull); + // This test has been seen to fail on mac_bot because the process did not keep running. + // Capturing stdout/stderr has been added subsequently to try and track this down. + // If you're ivnestigating this test failing in the future, feel free to + // mark is as skip (it's not currently critical) and notifiy dantup@ to look at the logs. + await new Future.delayed(const Duration(seconds: 3)); - expect(device.isRunning, true); + expect(device.isRunning, true, reason: 'Device did not remain running.\n\n$logs'.trim()); expect(await device.stopApp(null), isTrue); - }, skip: true); + }); }); }