Skip to content

Commit 9e0f184

Browse files
jyameoCommit Queue
authored andcommitted
Allow test to handle both RPCErrorKind.kConnectionDisposed and kServerError codes. These codes can be thrown if the VM shuts down before the service can send its response
Fixes #56909 Change-Id: I8a0a9328f2342811a6c230712c8b908bbd7d828c Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/396120 Auto-Submit: Jessy Yameogo <[email protected]> Reviewed-by: Ben Konyi <[email protected]> Commit-Queue: Ben Konyi <[email protected]>
1 parent 6e8180a commit 9e0f184

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/vm_service/test/kill_running_test.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,11 @@ final tests = <IsolateTest>[
2222
// There's a good chance `kill()` will throw due to the VM shutting down.
2323
// If an RPCError is thrown, make sure it's actually because the VM
2424
// service connection has disappeared.
25-
expect(e.code, RPCErrorKind.kConnectionDisposed.code);
25+
expect(
26+
[RPCErrorKind.kConnectionDisposed.code, RPCErrorKind.kServerError.code]
27+
.contains(e.code),
28+
true,
29+
);
2630
}
2731
}
2832
];

0 commit comments

Comments
 (0)