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

Side by Side Diff: pkg/analysis_server/benchmark/perf/performance_tests.dart

Issue 2413573003: Replace expect() with outOfTestExpect() in Analysis Server performance benchmark. (Closed)
Patch Set: Created 4 years, 2 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
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 library server.performance; 5 library server.performance;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:io'; 8 import 'dart:io';
9 9
10 import 'package:analysis_server/plugin/protocol/protocol.dart'; 10 import 'package:analysis_server/plugin/protocol/protocol.dart';
(...skipping 25 matching lines...) Expand all
36 Future setUp() { 36 Future setUp() {
37 onAnalysisErrors.listen((AnalysisErrorsParams params) { 37 onAnalysisErrors.listen((AnalysisErrorsParams params) {
38 currentAnalysisErrors[params.file] = params.errors; 38 currentAnalysisErrors[params.file] = params.errors;
39 }); 39 });
40 onServerError.listen((ServerErrorParams params) { 40 onServerError.listen((ServerErrorParams params) {
41 // A server error should never happen during an integration test. 41 // A server error should never happen during an integration test.
42 fail('${params.message}\n${params.stackTrace}'); 42 fail('${params.message}\n${params.stackTrace}');
43 }); 43 });
44 Completer serverConnected = new Completer(); 44 Completer serverConnected = new Completer();
45 onServerConnected.listen((_) { 45 onServerConnected.listen((_) {
46 expect(serverConnected.isCompleted, isFalse); 46 outOfTestExpect(serverConnected.isCompleted, isFalse);
47 serverConnected.complete(); 47 serverConnected.complete();
48 }); 48 });
49 return startServer(checked: false).then((_) { 49 return startServer(checked: false).then((_) {
50 server.listenToOutput(dispatchNotification); 50 server.listenToOutput(dispatchNotification);
51 server.exitCode.then((_) { 51 server.exitCode.then((_) {
52 skipShutdown = true; 52 skipShutdown = true;
53 }); 53 });
54 return serverConnected.future; 54 return serverConnected.future;
55 }); 55 });
56 } 56 }
(...skipping 12 matching lines...) Expand all
69 } 69 }
70 } 70 }
71 71
72 class AbstractTimingTest extends AbstractAnalysisServerPerformanceTest { 72 class AbstractTimingTest extends AbstractAnalysisServerPerformanceTest {
73 Future init(String source) async { 73 Future init(String source) async {
74 await super.setUp(); 74 await super.setUp();
75 sourceDirectory = new Directory(source); 75 sourceDirectory = new Directory(source);
76 return subscribeToStatusNotifications(); 76 return subscribeToStatusNotifications();
77 } 77 }
78 } 78 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698