[
https://issues.apache.org/jira/browse/DERBY-4217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710806#action_12710806
]
Tiago R. Espinha commented on DERBY-4217:
-----------------------------------------
Ok, I'm lost here :-)
The encapsulation of DEFAULT_PORT seems to be issue of debate on DERBY-2419,
and Kathey suggested the use of the port property of the TestConfiguration
class instead of overriding the DEFAULT_PORT static property. However, we have
a handful of constructors for this test and I am unsure of how to tackle this.
Should the port be overridden even when the constructor specifies a port?
With the static initialization I was using, the DEFAULT_PORT would *always* be
overridden and the port was left to be set by tests that rely on the
TestConfiguration constructors. However, with this method, only when the empty
constructor is used will the port be changed. On all the other cases (including
when tests invoke TestConfiguration.getCurrent() ) the port used will be the
1527 or whichever other is specified on the constructor.
I have set the port property to be defined to the system property when using
the empty constructor, and the test passes with and without the property
specified. However, some tests do still use the 1527 which isn't really desired.
This raises another question. When a test calls for the default configuration,
what configuration should be given to the test? One with the 1527 port or
should it contain the changed port? If we give it the 1527 port, then
concurrent testing will be out of the picture in the long run...
> Make the default port for the suites.All run configurable with a system
> property.
> ---------------------------------------------------------------------------------
>
> Key: DERBY-4217
> URL: https://issues.apache.org/jira/browse/DERBY-4217
> Project: Derby
> Issue Type: Sub-task
> Affects Versions: 10.6.0.0
> Reporter: Tiago R. Espinha
> Assignee: Tiago R. Espinha
> Attachments: DERBY-4217.patch, DERBY-4217.patch, DERBY-4217.patch,
> DERBY-4217.patch, DERBY-4217.stat, DERBY-4217.stat,
> ReproNetworkServerControl.java
>
>
> The goal is to make the port used for suites.All configurable through a
> system property passed on to the JVM.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.