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

Side by Side Diff: runtime/observatory/tests/service/get_isolate_rpc_test.dart

Issue 1347693004: getIsolate rpc now returns collected sentinel for expired isolate. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/service/running_isolates.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 // VMOptions=--error_on_bad_type --error_on_bad_override 4 // VMOptions=--error_on_bad_type --error_on_bad_override
5 5
6 import 'package:observatory/service_io.dart'; 6 import 'package:observatory/service_io.dart';
7 import 'package:unittest/unittest.dart'; 7 import 'package:unittest/unittest.dart';
8 8
9 import 'test_helper.dart'; 9 import 'test_helper.dart';
10 10
(...skipping 28 matching lines...) Expand all
39 await vm.invokeRpcNoUpgrade('getIsolate', params); 39 await vm.invokeRpcNoUpgrade('getIsolate', params);
40 expect(false, isTrue, reason:'Unreachable'); 40 expect(false, isTrue, reason:'Unreachable');
41 } on ServerRpcException catch(e) { 41 } on ServerRpcException catch(e) {
42 caughtException = true; 42 caughtException = true;
43 expect(e.code, equals(ServerRpcException.kInvalidParams)); 43 expect(e.code, equals(ServerRpcException.kInvalidParams));
44 expect(e.message, 44 expect(e.message,
45 "getIsolate: invalid 'isolateId' parameter: badid"); 45 "getIsolate: invalid 'isolateId' parameter: badid");
46 } 46 }
47 expect(caughtException, isTrue); 47 expect(caughtException, isTrue);
48 }, 48 },
49
50 // Plausible isolate id, not found.
51 (VM vm) async {
52 var params = {
53 'isolateId': 'isolates/9999999999',
54 };
55 var result = await vm.invokeRpcNoUpgrade('getIsolate', params);
56 expect(result['type'], equals('Sentinel'));
57 expect(result['kind'], equals('Collected'));
58 expect(result['valueAsString'], equals('<collected>'));
59 },
49 ]; 60 ];
50 61
51 main(args) async => runVMTests(args, tests); 62 main(args) async => runVMTests(args, tests);
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/service/running_isolates.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698