Index: runtime/observatory/tests/service/get_retaining_path_rpc_test.dart |
diff --git a/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart b/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart |
index c27301bf0bff98eee365e77e531ff596e636e1a2..40307be1e946017fced66fd9f7b05373f759574b 100644 |
--- a/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart |
+++ b/runtime/observatory/tests/service/get_retaining_path_rpc_test.dart |
@@ -56,8 +56,17 @@ var tests = [ |
var params = { |
'targetId': obj['id'], |
}; |
- var result = await isolate.invokeRpcNoUpgrade('_getRetainingPath', params); |
- expect(result['message'], contains("invalid 'limit' parameter")); |
+ bool caughtException; |
+ try { |
+ await isolate.invokeRpcNoUpgrade('_getRetainingPath', params); |
+ expect(false, isTrue, reason:'Unreachable'); |
+ } on ServerRpcException catch (e) { |
+ caughtException = true; |
+ expect(e.code, equals(ServerRpcException.kInvalidParams)); |
+ expect(e.data['details'], |
+ "_getRetainingPath expects the \'limit\' parameter"); |
+ } |
+ expect(caughtException, isTrue); |
}, |
(Isolate isolate) async { |