db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tiago R. Espinha (JIRA)" <j...@apache.org>
Subject [jira] Commented: (DERBY-4217) Make the default port for the suites.All run configurable with a system property.
Date Wed, 17 Jun 2009 20:02:07 GMT

    [ https://issues.apache.org/jira/browse/DERBY-4217?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12720857#action_12720857

Tiago R. Espinha commented on DERBY-4217:

Hello Kathey,

1) You are right, the masterServerPort can use the basePort instead, that way we save one
port in the total number of ports required.

Regarding initEnvironment(), it seems to me that that was something along the lines of what
was done in the TestConfiguration's empty constructor. The values are initialized to bogus
values and they are then set to the actual ones. But I'm not sure, so perhaps Ole can give
us some insight on this since he seems to be more familiar with replication?

I think we can safely get rid of the assignments done in initEnvironment() since apparently
they are very much useless. (They are useless on my patch and suites.All runs fine, with the
correct ports for the ReplicationSuite)

2) On TestConfiguration we don't have access to any kind of assertions since it's a standalone
class that doesn't extend from any of the test cases. Also, throwing an exception at the getNextAvailablePort()
will require that we catch the exception wherever the method is invoked. I'm not sure this
is a very good practice here...

Returning -1 was the way I found to make the test run crash. It isn't very verboseish I admit,
but I don't like the solution of throwing an exception either... especially because it won't
get dealt with automatically by JUnit.

3) Regarding the last topic, do note that I don't start a server. I just create an instance
of the NetworkServerControl and try to ping it. The goal here is to ensure that there isn't
something else bound on that port. If the ping succeeds then an exception isn't thrown and
-1 is returned, causing a failure. But this is of course arguable and realistically speaking
we probably don't really need it. If the port has something bound on it, then the test requesting
the port will naturally crash on its own.

> 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:
>            Reporter: Tiago R. Espinha
>            Assignee: Tiago R. Espinha
>         Attachments: DERBY-4217-basePort.patch, DERBY-4217-dtap.patch, DERBY-4217-dtap.patch,
DERBY-4217-dtp.patch, DERBY-4217-dtp.patch, DERBY-4217-dtp.patch, DERBY-4217-dtp.patch, DERBY-4217-dtp.patch,
DERBY-4217-ij.patch, DERBY-4217-ij.patch, DERBY-4217-ij.patch, DERBY-4217-ij.patch, DERBY-4217-ij.patch,
DERBY-4217-ij.stat, DERBY-4217-ij.stat, DERBY-4217.patch, DERBY-4217.patch, DERBY-4217.patch,
DERBY-4217.patch, DERBY-4217.stat, DERBY-4217.stat, ErrorLog_suitesAll_bound.tgz, 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.

View raw message