Index: runtime/observatory/tests/service/get_isolate_rpc_test.dart |
diff --git a/runtime/observatory/tests/service/get_isolate_rpc_test.dart b/runtime/observatory/tests/service/get_isolate_rpc_test.dart |
index ff6e2c665e1096083422ca7d8fdce03a02f94904..f45caf3ce9473aa29ce9599807d61ed5e485101c 100644 |
--- a/runtime/observatory/tests/service/get_isolate_rpc_test.dart |
+++ b/runtime/observatory/tests/service/get_isolate_rpc_test.dart |
@@ -29,6 +29,23 @@ var tests = [ |
expect(result['_heaps']['new']['type'], equals('HeapSpace')); |
expect(result['_heaps']['old']['type'], equals('HeapSpace')); |
}, |
+ |
+ (VM vm) async { |
+ var params = { |
+ 'isolateId': 'badid', |
+ }; |
+ bool caughtException; |
+ try { |
+ await vm.invokeRpcNoUpgrade('getIsolate', params); |
+ expect(false, isTrue, reason:'Unreachable'); |
+ } on ServerRpcException catch(e) { |
+ caughtException = true; |
+ expect(e.code, equals(ServerRpcException.kInvalidParams)); |
+ expect(e.message, |
+ "getIsolate: invalid 'isolateId' parameter: badid"); |
+ } |
+ expect(caughtException, isTrue); |
+ }, |
]; |
main(args) async => runVMTests(args, tests); |