Fix flakiness of commands_test (#11705)
- Wait for full Hot Reload - Wait for full Restart - Fallback if checkHealth throws METHOD_NOT_FOUND. We try to wait for the service extensions to be registered and retry.
This commit is contained in:
committed by
GitHub
parent
79d08f683a
commit
937b98e1b9
@@ -77,15 +77,21 @@ void main() {
|
||||
await driver.drive('none');
|
||||
final Future<String> reloadStartingText =
|
||||
stdout.stream.firstWhere((String line) => line.endsWith('hot reload...'));
|
||||
final Future<String> reloadEndingText =
|
||||
stdout.stream.firstWhere((String line) => line.contains('Hot reload performed in '));
|
||||
print('test: pressing "r" to perform a hot reload...');
|
||||
run.stdin.write('r');
|
||||
await reloadStartingText;
|
||||
await reloadEndingText;
|
||||
await driver.drive('none');
|
||||
final Future<String> restartStartingText =
|
||||
stdout.stream.firstWhere((String line) => line.endsWith('full restart...'));
|
||||
final Future<String> restartEndingText =
|
||||
stdout.stream.firstWhere((String line) => line.contains('Restart performed in '));
|
||||
print('test: pressing "R" to perform a full reload...');
|
||||
run.stdin.write('R');
|
||||
await restartStartingText;
|
||||
await restartEndingText;
|
||||
await driver.drive('none');
|
||||
run.stdin.write('q');
|
||||
final int result = await run.exitCode;
|
||||
|
||||
@@ -125,7 +125,6 @@ tasks:
|
||||
Runs tests of flutter run commands.
|
||||
stage: devicelab
|
||||
required_agent_capabilities: ["has-android-device"]
|
||||
flaky: true
|
||||
|
||||
android_sample_catalog_generator:
|
||||
description: >
|
||||
|
||||
Reference in New Issue
Block a user