You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Bernt M. Johnsen" <Be...@Sun.COM> on 2007/02/26 10:58:44 UTC

Multiple simultaneous test runs on the same machine

In the old test harness with the old tests this was impossible due to
hardcoded use of port numbers (1527 etc). Is this taken into
consideration when tests are moved to JUnit so that the port number(s)
may be parameterized in a convenient way?

-- 
Bernt Marius Johnsen, Database Technology Group, 
Staff Engineer, Technical Lead Derby/Java DB
Sun Microsystems, Trondheim, Norway

Re: Multiple simultaneous test runs on the same machine

Posted by Rick Hillegas <Ri...@Sun.COM>.
Hi Bernt,

I have not tried this out but it looks like the port number is 
configurable by setting a system property. I think that the tricky bits 
are in org.apache.derbyTesting.junit.TestConfiguration.

Hope this helps,
-Rick

Bernt M. Johnsen wrote:
> In the old test harness with the old tests this was impossible due to
> hardcoded use of port numbers (1527 etc). Is this taken into
> consideration when tests are moved to JUnit so that the port number(s)
> may be parameterized in a convenient way?
>
>   


Re: Multiple simultaneous test runs on the same machine

Posted by John Embretsen <Jo...@Sun.COM>.
Andrew McIntyre wrote:
> On 2/26/07, Bernt M. Johnsen <Be...@sun.com> wrote:
>> In the old test harness with the old tests this was impossible due to
>> hardcoded use of port numbers (1527 etc). Is this taken into
>> consideration when tests are moved to JUnit so that the port number(s)
>> may be parameterized in a convenient way?
> 
> TestConfiguration sets the port to 1527, but should it? If it didn't
> set a port, it would still default to 1527, and then you could
> override the port by setting -Dderby.drda.portNumber=whatever on the
> command-line when invoking the junit test.

What you are suggesting (which I think is a good idea) will also allow us to
test Derby's default behavior, that is not having the port number explicitly set
in the client driver URL or when starting the Network Server, and I think this
should be tested. I don't think any of our current Junit
tests/configurations/setups are doing this (at least not in the connection URL).


-- 
John



Re: Multiple simultaneous test runs on the same machine

Posted by Andrew McIntyre <mc...@gmail.com>.
On 2/26/07, Bernt M. Johnsen <Be...@sun.com> wrote:
> In the old test harness with the old tests this was impossible due to
> hardcoded use of port numbers (1527 etc). Is this taken into
> consideration when tests are moved to JUnit so that the port number(s)
> may be parameterized in a convenient way?

TestConfiguration sets the port to 1527, but should it? If it didn't
set a port, it would still default to 1527, and then you could
override the port by setting -Dderby.drda.portNumber=whatever on the
command-line when invoking the junit test.

andrew