diff --git a/pkg/vm_service/test/kill_running_test.dart b/pkg/vm_service/test/kill_running_test.dart index 6b17b68b859..569ca4dd396 100644 --- a/pkg/vm_service/test/kill_running_test.dart +++ b/pkg/vm_service/test/kill_running_test.dart @@ -22,7 +22,11 @@ final tests = [ // There's a good chance `kill()` will throw due to the VM shutting down. // If an RPCError is thrown, make sure it's actually because the VM // service connection has disappeared. - expect(e.code, RPCErrorKind.kConnectionDisposed.code); + expect( + [RPCErrorKind.kConnectionDisposed.code, RPCErrorKind.kServerError.code] + .contains(e.code), + true, + ); } } ];