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

Unified Diff: pkg/analysis_server/test/integration/integration_tests.dart

Issue 2812483002: Add integration tests for edit.getAssists and edit.getFixes. (Closed)
Patch Set: Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
Index: pkg/analysis_server/test/integration/integration_tests.dart
diff --git a/pkg/analysis_server/test/integration/integration_tests.dart b/pkg/analysis_server/test/integration/integration_tests.dart
index e41c54eb8c1503a636f453b6b47e70fea47b5963..b2ad8278752cf2285b037aac20d9df0a04f27687 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -459,7 +459,7 @@ class Server {
/**
* Server process object, or null if server hasn't been started yet.
*/
- Process _process = null;
+ Process _process;
/**
* Commands that have been sent to the server but not yet acknowledged, and
@@ -654,14 +654,15 @@ class Server {
* with "--observe" and "--pause-isolates-on-exit", allowing the observatory
* to be used.
*/
- Future start(
- {bool checked: true,
- int diagnosticPort,
- bool enableNewAnalysisDriver: false,
- bool profileServer: false,
- String sdkPath,
- int servicesPort,
- bool useAnalysisHighlight2: false}) {
+ Future start({
+ bool checked: true,
+ int diagnosticPort,
+ bool enableNewAnalysisDriver: false,
+ bool profileServer: false,
+ String sdkPath,
+ int servicesPort,
+ bool useAnalysisHighlight2: false,
+ }) async {
if (_process != null) {
throw new Exception('Process already started');
}
@@ -717,14 +718,12 @@ class Server {
// print('$dartBinary ${arguments.join(' ')}');
// TODO(devoncarew): We could experiment with instead launching the analysis
// server in a separate isolate. This would make it easier to debug the
- // integration tests, and would like speed the tests up as well.
- return Process.start(dartBinary, arguments).then((Process process) {
- _process = process;
- process.exitCode.then((int code) {
- if (code != 0) {
- _badDataFromServer('server terminated with exit code $code');
- }
- });
+ // integration tests, and would likely speed the tests up as well.
+ _process = await Process.start(dartBinary, arguments);
+ _process.exitCode.then((int code) {
+ if (code != 0) {
+ _badDataFromServer('server terminated with exit code $code');
+ }
});
}
« no previous file with comments | « pkg/analysis_server/test/integration/edit/test_all.dart ('k') | pkg/analysis_server/test/timing/timing_framework.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698