Unverified Commit f534aa00 authored by Ian Hickson's avatar Ian Hickson Committed by GitHub

Fix race condition in overall_experience_test (#81091)

parent 5e2f8631
...@@ -331,13 +331,13 @@ void main() { ...@@ -331,13 +331,13 @@ void main() {
processManager.killPid(pid, ProcessSignal.sigusr1); processManager.killPid(pid, ProcessSignal.sigusr1);
return null; 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(<Pattern>[RegExp(r'^Reloaded 0 libraries in [0-9]+ms\.$'), /*'called reassemble', (see TODO below)*/ 'called paint'], handler: (String line) { Multiple(<Pattern>[RegExp(r'^Reloaded 0 libraries in [0-9]+ms\.$'), /*'called reassemble', (see TODO below)*/ 'called paint'], handler: (String line) {
processManager.killPid(pid, ProcessSignal.sigusr2); processManager.killPid(pid, ProcessSignal.sigusr2);
return null; return null;
}), }),
Barrier(RegExp(r'^Performing hot restart\.\.\.')), Barrier(RegExp(r'^Performing hot restart\.\.\.')), // sametimes this includes the "called main" message
Multiple(<Pattern>[RegExp(r'^Restarted application in [0-9]+ms.$'), 'called main', 'called paint'], handler: (String line) { Multiple(<Pattern>[RegExp(r'^Restarted application in [0-9]+ms.$'), /*'called main', (see TODO below)*/ 'called paint'], handler: (String line) {
return 'q'; return 'q';
}), }),
const Barrier('Application finished.'), const Barrier('Application finished.'),
...@@ -349,13 +349,15 @@ void main() { ...@@ -349,13 +349,15 @@ void main() {
// is verified by the expected transitions above. // 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 // 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). // 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*/), <Object>[ expect(result.stdout.where((String line) => line.startsWith('called ') &&
line != 'called reassemble' /* see todo above*/ &&
line != 'called main' /* see todo above*/), <Object>[
// logs start after we receive the response to sending SIGUSR1 // logs start after we receive the response to sending SIGUSR1
// SIGUSR1: // SIGUSR1:
// 'called reassemble', // see todo above, this only sometimes gets included, other times it's on the "performing..." line // 'called reassemble', // see todo above, this only sometimes gets included, other times it's on the "performing..." line
'called paint', 'called paint',
// SIGUSR2: // SIGUSR2:
'called main', // 'called main', // see todo above, this is sometimes on the "performing..." line
'called paint', 'called paint',
]); ]);
expect(result.stdout.where((String line) => !line.startsWith('called ')), <Object>[ expect(result.stdout.where((String line) => !line.startsWith('called ')), <Object>[
......
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