You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2009/05/02 10:28:01 UTC

Unit testing occasional fails due port number already in use

Hi

This is a well known barrier for irritation.

The camel-ftp had particiluar this issue on other platforms such as
AIX, and some unix flavors.
What we did to remedy this was to use a new number when unit testing
to avoid clashing.

I am wondering if we should do the same for
- camel-jetty
- camel-cxf

That can have this issue as well sometimes, eg as port 9080, 8080, or
what we use can cause the port number already in use issue.

For inspiration see the camel-ftp there is some base ftp unit test
classes that set ups the feature to use a new number each time.

Any thoughts?



-- 
Claus Ibsen
Apache Camel Committer

Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus
Apache Camel Reference Card:
http://refcardz.dzone.com/refcardz/enterprise-integration

Re: Unit testing occasional fails due port number already in use

Posted by Willem Jiang <wi...@gmail.com>.
Yes, we could add some util in the TestSupport Class to detect a free
port for testing.

Willem

Claus Ibsen wrote:
> Hi
> 
> This is a well known barrier for irritation.
> 
> The camel-ftp had particiluar this issue on other platforms such as
> AIX, and some unix flavors.
> What we did to remedy this was to use a new number when unit testing
> to avoid clashing.
> 
> I am wondering if we should do the same for
> - camel-jetty
> - camel-cxf
> 
> That can have this issue as well sometimes, eg as port 9080, 8080, or
> what we use can cause the port number already in use issue.
> 
> For inspiration see the camel-ftp there is some base ftp unit test
> classes that set ups the feature to use a new number each time.
> 
> Any thoughts?
> 
> 
>