qickrooms / flex-mojos

Automatically exported from code.google.com/p/flex-mojos
0 stars 0 forks source link

concurrent test fail because port is in use #137

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create two flex projects both with unit tests.
2. Open two command prompts... one for each project.
3. Call mvn test on both projects at the same time.

What is the expected output? What do you see instead?
I would expect both tests to run without conflict but instead Java throws
an exception because the port is in use.

What version of the product are you using? On what operating system?
Flex Mojos M8 with FlexUnit 0.9

Please provide any additional information below.
The reason I run into this problem so frequently is because I use an
automated build server (Hudson) with a team of 5 developers.

What would be nice is if Flex Mojos could check to see if the port is in
use just before starting the test build. If it is in use then try another
port. Additionally it might be useful to pick ports at random to even
further reduce any chance of port conflicts.

Original issue reported on code.google.com by llin...@gmail.com on 24 Nov 2008 at 12:49

GoogleCodeExporter commented 9 years ago
You can define it using testPort:
http://docs.flex-mojos.info/flex-compiler-mojo/test-compile-mojo.html#testPort

Hudson has a plugin to handle that! Port allocator plugin:
http://hudson.gotdns.com/wiki//display/HUDSON/Port+Allocator+Plugin

We (at Sonatype) have ported this plugin to maven.  Search for
port-allocator-maven-plugin at repository.sonatype.com

I can't resolve that at mojo because I need this value available at java and 
flex. 
Well is possible, but is much more easy to use a port allocator plugin.

VELO

Original comment by velo...@gmail.com on 24 Nov 2008 at 1:55

GoogleCodeExporter commented 9 years ago
I didn't know such a thing as a port allocator plugin existed. I will check them
out... thanks for the suggestion!

Lance

Original comment by llin...@gmail.com on 24 Nov 2008 at 7:32