harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko" <alexey.a.petre...@gmail.com>
Subject Re: [classlib][luni] java.net.ServerSocketTest fails - need help
Date Wed, 06 Dec 2006 09:48:19 GMT
I do not think that reserving one of widely used ports for tests is a good idea.
Since user can run http server on his machine for example. And I do
not think that he will be happy to switch it off each time.

I think that we can reserve some port near the end of the port space.
Somethong like 63527 or so.
Another approach is to try another port if ServerSocket reports that
the port is busy (I do not remember does ServerSocket throw different
exception for busy port or not...)

SY, Alexey

2006/12/6, Tony Wu <wuyuehao@gmail.com>:
> I think it is reasonable if some essential configuration should be
> done at first when running harmony tests, especially in java.net. My
> opinion is to fix some regular used port, like 80, 8080, etc. Users
> should guarantee that these ports are available when running testcases
> (we could document this in our instruction for running test).
>
>
> On 12/6/06, Andrew Zhang <zhanghuangzhu@gmail.com> wrote:
> > On 12/6/06, Zakharov, Vasily M <vasily.m.zakharov@intel.com> wrote:
> > >
> > >
> > > > oh... Interesting. It's the test for ServerSocket. Some tests like
> > > > constructor test have to test not only 0, but also specified port.
> > > > Nevertheless, I think it's ok to use port 0 for the case described in
> > > > Harmony-2338. Comments?
> > >
> > > That's exactly the problem - you should test how the constructors
> > > (and methods like bind()) handle the specified port numbers, but for
> > > that you have to get those numbers fronm somewhere.
> >
> >
> > So shall we reserve a port for running Harmony test and document it?
> >
> > Using port 0 makes the test running, but reduces it's testing value.
> > > So it's a give&take solution.
> >
> >
> > Agree.
> >
> > Vasily
> > >
> > > -----Original Message-----
> > > From: Andrew Zhang [mailto:zhanghuangzhu@gmail.com]
> > > Sent: Wednesday, December 06, 2006 7:33 AM
> > > To: dev@harmony.apache.org
> > > Subject: Re: [classlib][luni] java.net.ServerSocketTest fails - need
> > > help
> > >
> > > On 12/6/06, Andrew Zhang <zhanghuangzhu@gmail.com> wrote:
> > > >
> > > >
> > > >
> > > > On 12/6/06, Zakharov, Vasily M <vasily.m.zakharov@intel.com> wrote:
> > > > >
> > > > >
> > > > > I've investigated the
> > > http://issues.apache.org/jira/browse/HARMONY-2338
> > > > > issue,
> > > > > the detailed description of the problem is available at the JIRA
> > > page.
> > > > >
> > > > > Could anyone qualified in java.net please look into it and suggest
> > > how
> > > > > this should be fixed?
> > > > >
> > > > > There's a problem with tests.api.java.net.ServerSocketTest test
> > > design
> > > > > that uses "random" ports for testing and fails when those ports
> > > happen
> > > > > to be occupied by other applications.
> > > >
> > > >
> > > > Hi Zakharov, I think we've agreed to use port 0 to select a free port
> > > in
> > > > test case.
> > > >
> > > > But we're doing this lazily. I'll fix ServerSocketTest soon. Thanks!
> > > >
> > >
> > > oh... Interesting. It's the test for ServerSocket. Some tests like
> > > constructor test have to test not only 0, but also specified port.
> > > Nevertheless, I think it's ok to use port 0 for the case described in
> > > Harmony-2338. Comments?
> > >
> > > I see many apparent possible fixes for the problem, but none of them
> > > > > looks good enough to implement immediately - they all have drawbacks
> > > and
> > > > >
> > > > > I'm not a java.net guru to judge which of those drawbacks are
> > > essential
> > > > > and which are not.
> > > > >
> > > > > Thank you!
> > > > >
> > > > > Vasily Zakharov
> > > > > Intel Enterprise Solutions Software Division
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Best regards,
> > > > Andrew Zhang
> > >
> > >
> > >
> > >
> > > --
> > > Best regards,
> > > Andrew Zhang
> > >
> >
> >
> >
> > --
> > Best regards,
> > Andrew Zhang
> >
> >
>
>
> --
> Tony Wu
> China Software Development Lab, IBM
>

Mime
View raw message