From f534aa0043ba6659f70cbb82acf9185f868bd966 Mon Sep 17 00:00:00 2001 From: Ian Hickson Date: Mon, 26 Apr 2021 11:29:03 -0700 Subject: [PATCH] Fix race condition in overall_experience_test (#81091) --- .../integration.shard/overall_experience_test.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/flutter_tools/test/integration.shard/overall_experience_test.dart b/packages/flutter_tools/test/integration.shard/overall_experience_test.dart index 3cc87d5bad..cc12bd8628 100644 --- a/packages/flutter_tools/test/integration.shard/overall_experience_test.dart +++ b/packages/flutter_tools/test/integration.shard/overall_experience_test.dart @@ -331,13 +331,13 @@ void main() { processManager.killPid(pid, ProcessSignal.sigusr1); return null; }), - Barrier(RegExp(r'^Performing hot reload\.\.\.'), logging: true), + Barrier(RegExp(r'^Performing hot reload\.\.\.'), logging: true), // sometimes this includes the "called reassemble" message Multiple([RegExp(r'^Reloaded 0 libraries in [0-9]+ms\.$'), /*'called reassemble', (see TODO below)*/ 'called paint'], handler: (String line) { processManager.killPid(pid, ProcessSignal.sigusr2); return null; }), - Barrier(RegExp(r'^Performing hot restart\.\.\.')), - Multiple([RegExp(r'^Restarted application in [0-9]+ms.$'), 'called main', 'called paint'], handler: (String line) { + Barrier(RegExp(r'^Performing hot restart\.\.\.')), // sametimes this includes the "called main" message + Multiple([RegExp(r'^Restarted application in [0-9]+ms.$'), /*'called main', (see TODO below)*/ 'called paint'], handler: (String line) { return 'q'; }), const Barrier('Application finished.'), @@ -349,13 +349,15 @@ void main() { // is verified by the expected transitions above. // TODO(ianh): Fix the tool so that the output isn't garbled (right now we're putting debug output from // the app on the line where we're spinning the busy signal, rather than adding a newline). - expect(result.stdout.where((String line) => line.startsWith('called ') && line != 'called reassemble' /* see todo above*/), [ + expect(result.stdout.where((String line) => line.startsWith('called ') && + line != 'called reassemble' /* see todo above*/ && + line != 'called main' /* see todo above*/), [ // logs start after we receive the response to sending SIGUSR1 // SIGUSR1: // 'called reassemble', // see todo above, this only sometimes gets included, other times it's on the "performing..." line 'called paint', // SIGUSR2: - 'called main', + // 'called main', // see todo above, this is sometimes on the "performing..." line 'called paint', ]); expect(result.stdout.where((String line) => !line.startsWith('called ')), [