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

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

Issue 1662833002: Fix race in service/logging_test. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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 | no next file » | 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 4
5 import 'dart:developer' as developer; 5 import 'dart:developer' as developer;
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 import 'package:logging/logging.dart'; 8 import 'package:logging/logging.dart';
9 9
10 import 'test_helper.dart'; 10 import 'test_helper.dart';
(...skipping 22 matching lines...) Expand all
33 33
34 var tests = [ 34 var tests = [
35 hasStoppedAtBreakpoint, 35 hasStoppedAtBreakpoint,
36 resumeIsolateAndAwaitEvent(Isolate.kLoggingStream, (ServiceEvent event) { 36 resumeIsolateAndAwaitEvent(Isolate.kLoggingStream, (ServiceEvent event) {
37 expect(event.kind, equals(ServiceEvent.kLogging)); 37 expect(event.kind, equals(ServiceEvent.kLogging));
38 expect(event.logRecord['sequenceNumber'], equals(0)); 38 expect(event.logRecord['sequenceNumber'], equals(0));
39 expect(event.logRecord['message'].valueAsString, equals('Hey Buddy!')); 39 expect(event.logRecord['message'].valueAsString, equals('Hey Buddy!'));
40 expect(event.logRecord['level'], equals(Level.FINE)); 40 expect(event.logRecord['level'], equals(Level.FINE));
41 expect(event.logRecord['time'], new isInstanceOf<DateTime>()); 41 expect(event.logRecord['time'], new isInstanceOf<DateTime>());
42 }), 42 }),
43 hasStoppedAtBreakpoint,
43 resumeIsolateAndAwaitEvent(Isolate.kLoggingStream, (ServiceEvent event) { 44 resumeIsolateAndAwaitEvent(Isolate.kLoggingStream, (ServiceEvent event) {
44 expect(event.kind, equals(ServiceEvent.kLogging)); 45 expect(event.kind, equals(ServiceEvent.kLogging));
45 expect(event.logRecord['sequenceNumber'], equals(1)); 46 expect(event.logRecord['sequenceNumber'], equals(1));
46 expect(event.logRecord['level'], equals(Level.INFO)); 47 expect(event.logRecord['level'], equals(Level.INFO));
47 expect(event.logRecord['message'].valueAsString, equals('YES')); 48 expect(event.logRecord['message'].valueAsString, equals('YES'));
48 expect(event.logRecord['time'], new isInstanceOf<DateTime>()); 49 expect(event.logRecord['time'], new isInstanceOf<DateTime>());
49 }), 50 }),
50 ]; 51 ];
51 52
52 main(args) => runIsolateTests(args, 53 main(args) => runIsolateTests(args,
53 tests, 54 tests,
54 testeeBefore: init, 55 testeeBefore: init,
55 testeeConcurrent: run); 56 testeeConcurrent: run);
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698