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

Unified Diff: sdk/lib/_internal/pub/test/test_pub.dart

Issue 19494012: Report correct socket error and use HttpServer:close future in pub. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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 | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/pub/test/test_pub.dart
diff --git a/sdk/lib/_internal/pub/test/test_pub.dart b/sdk/lib/_internal/pub/test/test_pub.dart
index 5d1afcfd17fb1b7ca35ac96e14068d3dde17a381..c54a3bdf9a86e0d469c1d3c9ec3927ddc3087583 100644
--- a/sdk/lib/_internal/pub/test/test_pub.dart
+++ b/sdk/lib/_internal/pub/test/test_pub.dart
@@ -10,7 +10,7 @@ library test_pub;
import 'dart:async';
import 'dart:collection' show Queue;
-import 'dart:io' hide sleep;
+import 'dart:io';
import 'dart:json' as json;
import 'dart:math';
import 'dart:utf';
@@ -137,13 +137,10 @@ void serve([List<d.Descriptor> contents]) {
/// is closed.
Future _closeServer() {
if (_server == null) return new Future.value();
- _server.close();
+ var future = _server.close();
_server = null;
_portCompleterCache = null;
- // TODO(nweiz): Remove this once issue 4155 is fixed. Pumping the event loop
- // *seems* to be enough to ensure that the server is actually closed, but I'm
- // putting this at 10ms to be safe.
- return sleep(10);
+ return future;
}
/// `true` if the current test spins up an HTTP server.
« no previous file with comments | « sdk/lib/_internal/pub/lib/src/utils.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698