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

Unified Diff: tools/testing/dart/http_server.dart

Issue 11032047: Fix issues with test.dart that appeared on Mac. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 side-by-side diff with in-line comments
Download patch
Index: tools/testing/dart/http_server.dart
diff --git a/tools/testing/dart/http_server.dart b/tools/testing/dart/http_server.dart
index 820f07ba16a733b6a18a429e7152005b3c9cc93e..b939e2cd45c1c839309cefc8c51657b158ac475f 100644
--- a/tools/testing/dart/http_server.dart
+++ b/tools/testing/dart/http_server.dart
@@ -10,11 +10,7 @@
HttpServer _httpServer;
-// TODO(ager): Get rid of this when we get the Mac to behave.
-int _retries = 10;
-
-Future<bool> startHttpServer(String host, int port) {
- var completer = new Completer();
+void startHttpServer(String host, int port) {
var basePath = TestUtils.dartDir();
_httpServer = new HttpServer();
_httpServer.onError = (e) {
@@ -46,21 +42,7 @@ Future<bool> startHttpServer(String host, int port) {
}
};
- // TODO(ager): Get rid of this when we get the mac to behave.
- // Even though we have set the SO_REUSEADDR the mac is not
- // happy and gives us address alread in use errors.
- try {
- _httpServer.listen(host, port);
- completer.complete(true);
- } catch (e) {
- if (_retries-- == 0) {
- completer.completeException(e);
- }
- new Timer(1000, (t) {
- startHttpServer(host, port).then((r) => completer.complete(r));
- });
- }
- return completer.future;
+ _httpServer.listen(host, port);
}
terminateHttpServer() {

Powered by Google App Engine
This is Rietveld 408576698