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

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

Issue 425803009: Better implementation of shutdown timeout. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 59c3f321a5f32be02fd6c197d3bb1aebbc83dbca..3447a9f4dbb936e59b87e41f85faec977277be79 100644
--- a/pkg/analysis_server/test/integration/integration_tests.dart
+++ b/pkg/analysis_server/test/integration/integration_tests.dart
@@ -168,15 +168,9 @@ abstract class AbstractAnalysisServerIntegrationTest {
// doesn't exit, then forcibly terminate it.
Completer processExited = new Completer();
server.send(SERVER_SHUTDOWN, null);
- server.exitCode.whenComplete(() {
- processExited.complete();
+ return server.exitCode.timeout(SHUTDOWN_TIMEOUT, onTimeout: () {
+ return server.kill();
});
- new Future.delayed(SHUTDOWN_TIMEOUT).then((_) {
- if (!processExited.isCompleted) {
- server.kill();
- }
- });
- return processExited.future;
}
}
« 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