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..632f3401ecbd30755745838581c4da0810fa7053 100644 |
--- a/sdk/lib/_internal/pub/test/test_pub.dart |
+++ b/sdk/lib/_internal/pub/test/test_pub.dart |
@@ -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(); |
Bob Nystrom
2013/07/22 21:02:51
How about just moving this to the end of the fn an
nweiz
2013/07/22 21:03:49
We'd still need a local variable for "server", sin
|
_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. |