We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b5d262 commit 7d1998dCopy full SHA for 7d1998d
pkg/vm_service/test/should_pause_on_exit_test.dart
@@ -38,7 +38,19 @@ final tests = <IsolateTest>[
38
expect(await shouldPauseOnExit(service, isolateRef), true);
39
await service.resume(isolateRef.id!);
40
await completer.future;
41
- await service.resume(isolateRef.id!);
+ try {
42
+ await service.resume(isolateRef.id!);
43
+ } on RPCError catch (e) {
44
+ // The server may have already shut down, causing the service connection
45
+ // to be disposed before the resume response is sent.
46
+ if (![
47
+ RPCErrorKind.kConnectionDisposed.code,
48
+ RPCErrorKind.kServerError.code,
49
+ ].contains(e.code)) {
50
+ rethrow;
51
+ }
52
+ // This is expected - ignore it.
53
54
await subscription.cancel();
55
},
56
];
0 commit comments