db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kristian Waagan (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4700) Add method to obtain a bogus port in TestConfiguration
Date Wed, 16 Jun 2010 08:56:23 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4700?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12879281#action_12879281
] 

Kristian Waagan commented on DERBY-4700:
----------------------------------------

Makes sense to follow an existing pattern. Note that there are eight constructors...
BTW, the extra logic for the other approach would be changing '>' to '>=' ;)

In a way we are wasting ports by allocating them even if they are not used, but I think it
is better to allocate them early on for the sake of clarity.
Should we also add debug print outs for the additional ports (jmx and bogus) to aid debugging
port conflicts?

> Add method to obtain a bogus port in TestConfiguration
> ------------------------------------------------------
>
>                 Key: DERBY-4700
>                 URL: https://issues.apache.org/jira/browse/DERBY-4700
>             Project: Derby
>          Issue Type: Improvement
>          Components: Test
>    Affects Versions: 10.7.0.0
>            Reporter: Kristian Waagan
>            Priority: Minor
>
> In some cases one needs to obtain a port number on which there is no Derby network server.
> Today this is solved in an ad-hoc way, for instance by using the current port minus one.
When running tests in parallel, there is a chance that a port where there actually is a Derby
network server listening is picked.
> As a start, I suggest that the bogus port is allocated to the last port in the port range
configured for the run: baseport + MAX_PORTS_USED -1.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message