[ http://issues.apache.org/jira/browse/DERBY-952?page=all ]

Bryan Pendleton updated DERBY-952:
----------------------------------

    Attachment: derby-952-idea.diff

Another possible way to solve this would be to let the system pick a free port 
number to use. That way, we wouldn't have to worry about what port number might 
 be in use.

Attached is 'derby-952-idea.diff', which has a first start toward such an 
implementation (sort of a proof of concept). The idea is that we would:
 - use java.net.ServerSocket(0) to find a free port number on the system
 - tweak the derby_tests.properties to grant a looser permission to allow us to 
open an arbitrary port in our test
 - tweak the filtering code to filter out the actual port number from the output

We'd have to update some test reference files to include 
xxxFILTERED-PORT-NUMBERxxx if we used this approach. I haven't tried to figure 
out how many such output files there are. I just verified that, with the 
changes in this diff, I can successfully let the operating system pick a port 
number for us and then use that number rather than the hard coded 20000.

What do you think?

thanks,

bryan

> DerbyNet/derbynetmats/NSinSameJVM fails on Win XP / Cygwin
> ----------------------------------------------------------
>
>          Key: DERBY-952
>          URL: http://issues.apache.org/jira/browse/DERBY-952
>      Project: Derby
>         Type: Test
>   Components: Regression Test Failure
>     Versions: 10.2.0.0
>  Environment: OS:  Microsoft Windows XP Professional - 5.1.2600 Service Pack 
> 2 Build 2600, CYGWIN_NT-5.1 1.5.18(0.132/4/2) 2005-07-02 20:30 Cygwin
> JVM:  Sun Microsystems Inc. 1.5.0_05
>     Reporter: Ole Solberg
>  Attachments: derby-952-idea.diff
>
> ********* Diff file 
> derbyall/derbynetmats/DerbyNet/derbynetmats/NSinSameJVM.diff
> *** Start: NSinSameJVM jdk1.5.0_05 DerbyNet derbynetmats:derbynetmats 
> 2006-02-05 02:01:20 ***
> 3 del
> < main-NSinSameJVM: NetworkServer started
> 4 del
> < main-NSinSameJVM: Connected to database NSinSameJVMTestDB;create=true
> 5 del
> < getting ready to shutdown
> 6 del
> < Shutdown successful.
> 6 add
> > FAIL Network Server did not start
> Test Failed.
> *** End:   NSinSameJVM jdk1.5.0_05 DerbyNet derbynetmats:derbynetmats 
> 2006-02-05 02:02:10 ***
> *
> http://www.multinet.no/~solberg/public/Apache/Derby/testlog/CYGWIN_NT-5.1_i686-unknown/373335-derbynetmats_diff.txt

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to