Unverified Commit 592a842b authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

[flutter_tool] fix NPE in daemon caused by returning null connection info from...

[flutter_tool] fix NPE in daemon caused by returning null connection info from experimental web runner (#46909)
parent 948e2b01
...@@ -535,7 +535,7 @@ class _ExperimentalResidentWebRunner extends ResidentWebRunner { ...@@ -535,7 +535,7 @@ class _ExperimentalResidentWebRunner extends ResidentWebRunner {
_wipConnection = await chromeTab.connect(); _wipConnection = await chromeTab.connect();
} }
appStartedCompleter?.complete(); appStartedCompleter?.complete();
connectionInfoCompleter?.complete(); connectionInfoCompleter?.complete(DebugConnectionInfo());
if (stayResident) { if (stayResident) {
await waitForAppToFinish(); await waitForAppToFinish();
} else { } else {
......
...@@ -378,7 +378,10 @@ void main() { ...@@ -378,7 +378,10 @@ void main() {
unawaited(residentWebRunner.run( unawaited(residentWebRunner.run(
connectionInfoCompleter: connectionInfoCompleter, connectionInfoCompleter: connectionInfoCompleter,
)); ));
await connectionInfoCompleter.future; final DebugConnectionInfo debugConnectionInfo = await connectionInfoCompleter.future;
expect(debugConnectionInfo, isNotNull);
final OperationResult result = await residentWebRunner.restart(fullRestart: false); final OperationResult result = await residentWebRunner.restart(fullRestart: false);
expect(testLogger.statusText, contains('Reloaded application in')); expect(testLogger.statusText, contains('Reloaded application in'));
......
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