Index: runtime/observatory/tests/service/native_metrics_test.dart |
diff --git a/runtime/observatory/tests/service/native_metrics_test.dart b/runtime/observatory/tests/service/native_metrics_test.dart |
index 0803fabc684eaec119fc29b72f51c67fae8b0043..dd713a26071030197206bea3f2e79eb6d53c35dd 100644 |
--- a/runtime/observatory/tests/service/native_metrics_test.dart |
+++ b/runtime/observatory/tests/service/native_metrics_test.dart |
@@ -16,37 +16,40 @@ void script() { |
} |
var tests = [ |
+ |
(Isolate isolate) async { |
Map metrics = await isolate.refreshNativeMetrics(); |
expect(metrics.length, greaterThan(1)); |
expect(metrics.length, greaterThan(1)); |
- var foundOldHeapCapacity = |
- metrics.values.any((m) => m.name == 'heap.old.capacity'); |
+ var foundOldHeapCapacity = metrics.values.any( |
+ (m) => m.name == 'heap.old.capacity'); |
expect(foundOldHeapCapacity, equals(true)); |
}, |
+ |
(Isolate isolate) async { |
- var params = {'metricId': 'metrics/native/heap.old.used'}; |
+ var params = { 'metricId': 'metrics/native/heap.old.used' }; |
ServiceMetric counter = |
- await isolate.invokeRpc('_getIsolateMetric', params); |
+ await isolate.invokeRpc('_getIsolateMetric', params); |
expect(counter.type, equals('Counter')); |
expect(counter.name, equals('heap.old.used')); |
}, |
+ |
(Isolate isolate) async { |
bool caughtException; |
try { |
- await isolate.invokeRpc( |
- '_getIsolateMetric', {'metricId': 'metrics/native/doesnotexist'}); |
- expect(false, isTrue, reason: 'Unreachable'); |
+ await isolate.invokeRpc('_getIsolateMetric', |
+ { 'metricId': 'metrics/native/doesnotexist' }); |
+ expect(false, isTrue, reason:'Unreachable'); |
} on ServerRpcException catch (e) { |
caughtException = true; |
expect(e.code, equals(ServerRpcException.kInvalidParams)); |
- expect( |
- e.message, |
- "_getIsolateMetric: invalid 'metricId' " |
- "parameter: metrics/native/doesnotexist"); |
+ expect(e.message, |
+ "_getIsolateMetric: invalid 'metricId' " |
+ "parameter: metrics/native/doesnotexist"); |
} |
expect(caughtException, isTrue); |
}, |
+ |
]; |
main(args) => runIsolateTests(args, tests, testeeBefore: script); |