I know of a couple of tests that get random ports (which is actually better 
since configured ports might not be available).

Ralph

On May 22, 2014, at 5:01 PM, Remko Popma <[email protected]> wrote:

> I'm guessing they share config files, I haven't checked. 
> 
> Sent from my iPhone
> 
> On 2014/05/23, at 9:00, Remko Popma <[email protected]> wrote:
> 
>> If I'm not mistaken currently tests share config files so they naturally use 
>> the same port. It's a bit of work, but perhaps we can give each test its own 
>> config file (with unique port).
>> 
>> Sent from my iPhone
>> 
>> On 2014/05/23, at 0:04, Gary Gregory <[email protected]> wrote:
>> 
>>> Then you have to reconcile the free port the test finds and the port 
>>> defined in the config file! For tests that do use config files of course...
>>> 
>>> Gary
>>> 
>>> 
>>> On Thu, May 22, 2014 at 10:47 AM, Matt Sicker <[email protected]> wrote:
>>> It looks like we may need something more advanced than what I've got here 
>>> if we want to run forked tests. Threaded tests would work better here 
>>> because the class keeps static state. However, to share between VMs, that 
>>> would become a non-trivial problem :)
>>> 
>>> 
>>> On 21 May 2014 20:38, Remko Popma <[email protected]> wrote:
>>> Thanks! Actually, this reuse of ports is one reason I couldn't run the core 
>>> tests in parallel, so having a solution for that would bring us a step 
>>> closer to a faster build.
>>> 
>>> Sent from my iPhone
>>> 
>>> > On 2014/05/22, at 2:00, [email protected] wrote:
>>> >
>>> > Author: mattsicker
>>> > Date: Wed May 21 17:00:08 2014
>>> > New Revision: 1596620
>>> >
>>> > URL: http://svn.apache.org/r1596620
>>> > Log:
>>> > Disable broken test for now.
>>> >
>>> > Need to add some support for finding an available port number. I
>>> > have something from Camel that would be useful.
>>> >
>>> > Modified:
>>> >    
>>> > logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/SocketMessageLossTest.java
>>> >
>>> > Modified: 
>>> > logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/SocketMessageLossTest.java
>>> > URL: 
>>> > http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/SocketMessageLossTest.java?rev=1596620&r1=1596619&r2=1596620&view=diff
>>> > ==============================================================================
>>> > --- 
>>> > logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/SocketMessageLossTest.java
>>> >  (original)
>>> > +++ 
>>> > logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/net/SocketMessageLossTest.java
>>> >  Wed May 21 17:00:08 2014
>>> > @@ -31,10 +31,12 @@ import org.apache.logging.log4j.Logger;
>>> > import org.apache.logging.log4j.core.appender.AppenderLoggingException;
>>> > import org.apache.logging.log4j.junit.InitialLoggerContext;
>>> > import org.junit.ClassRule;
>>> > +import org.junit.Ignore;
>>> > import org.junit.Test;
>>> >
>>> > import static org.junit.Assert.*;
>>> >
>>> > +@Ignore("Currently needs better port choosing support")
>>> > public class SocketMessageLossTest {
>>> >     private static final int SOCKET_PORT = 5514;
>>> >
>>> >
>>> >
>>> 
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>> 
>>> 
>>> 
>>> 
>>> -- 
>>> Matt Sicker <[email protected]>
>>> 
>>> 
>>> 
>>> -- 
>>> E-Mail: [email protected] | [email protected] 
>>> Java Persistence with Hibernate, Second Edition
>>> JUnit in Action, Second Edition
>>> Spring Batch in Action
>>> Blog: http://garygregory.wordpress.com 
>>> Home: http://garygregory.com/
>>> Tweet! http://twitter.com/GaryGregory

Reply via email to