brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] brooklyn-server pull request #560: Attempted non-determinate test fixes
Date Thu, 16 Feb 2017 17:25:42 GMT
Github user neykov commented on a diff in the pull request:
    --- Diff: launcher/src/main/java/org/apache/brooklyn/launcher/ ---
    @@ -447,7 +450,15 @@ public synchronized void start() throws Exception {
             rootContext.setTempDirectory(Os.mkdirs(new File(webappTempDir, "war-root")));
    -        server.start();
    +        try {
    +            server.start();
    +        } catch (BindException e) {
    +            // port discovery routines may take some time to clear, e.g. 250ms for SO_TIMEOUT
    +            // tests fail because of this; see if adding a delay improves things
    +            log.warn("Initial server start-up failed binding (retrying after a delay):
    +            Time.sleep(Duration.millis(500));
    +            server.start();
    --- End diff -- - will let it run a few times to see
how it behaves on the salves. Obviously not failing doesn't mean anything.
    While experimenting I found that `SO_REUSEADDR` is activated **by default** on `ServerSocket`.

If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at or file a JIRA ticket
with INFRA.

View raw message