Unverified Commit f8a5baf3 authored by Jonah Williams's avatar Jonah Williams Committed by GitHub

Dont close debug connection on exit (#42655)

parent 0dce0c6e
......@@ -108,7 +108,6 @@ class ResidentWebRunner extends ResidentRunner {
if (_exited) {
return;
}
await _connectionResult?.debugConnection?.close();
await _stdOutSub?.cancel();
await _webFs?.stop();
await device.stopApp(null);
......
......@@ -431,11 +431,12 @@ void main() {
test('cleanup of resources is safe to call multiple times', () => testbed.run(() async {
_setupMocks();
bool debugClosed = false;
when(mockDebugConnection.close()).thenAnswer((Invocation invocation) async {
when(mockWebDevice.stopApp(any)).thenAnswer((Invocation invocation) async {
if (debugClosed) {
throw StateError('debug connection closed twice');
}
debugClosed = true;
return true;
});
final Completer<DebugConnectionInfo> connectionInfoCompleter = Completer<DebugConnectionInfo>();
unawaited(residentWebRunner.run(
......@@ -445,6 +446,8 @@ void main() {
await residentWebRunner.exit();
await residentWebRunner.exit();
verifyNever(mockDebugConnection.close());
}));
test('Prints target and device name on run', () => testbed.run(() async {
......
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