Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1480)

Unified Diff: runtime/observatory/tests/service/get_isolate_rpc_test.dart

Issue 1297313005: Fix the error response for bad isolate ids, etc. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/service/client.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | runtime/vm/service/client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698