Skip to content

Commit

Permalink
Fixing (i hope) problem with hanging test
Browse files Browse the repository at this point in the history
testConnectWhenAlreadyConnected() appears to be hanging intermittently
on Travis builds. This never happens for me locally and getting logs out
of that environment can be hard, especially as the problem is
intermittent (maybe 1/10 builds). Shuffling some things around to
hopefully cause the condition this test is confirming to execute
earlier, before anything has the chance to hang. If the tests starts
failing on local builds a better investigation is needed.
  • Loading branch information
timpokorny committed Apr 25, 2016
1 parent f3389df commit a60dedd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -207,17 +207,17 @@ public void connect( FederateAmbassador federateReference, CallbackModel callbac
CallNotAllowedFromWithinCallback,
RTIinternalError
{
// check to make sure we're not already connected
if( helper.getFederateAmbassador() != null )
throw new AlreadyConnected("");

// set the callback model on the LRC approrpriately
this.helper.setCallbackModel( callbackModel );
if( callbackModel == CallbackModel.HLA_EVOKED )
helper.getLrc().disableImmediateCallbackProcessing();
else if( callbackModel == CallbackModel.HLA_IMMEDIATE )
helper.getLrc().enableImmediateCallbackProcessing();

// check to make sure we're not already connected
if( helper.getFederateAmbassador() != null )
throw new AlreadyConnected("");

// store the FederateAmbassador for now, we'll stick it on the join call shortly
this.helper.connected( federateReference );
}
Expand Down
Expand Up @@ -98,7 +98,7 @@ public void testConnect() throws Exception
@Test
public void testConnectWhenAlreadyConnected()
{
federateOne.quickConnect();
federateOne.quickConnectWithImmediateCallbacks();

try
{
Expand Down

0 comments on commit a60dedd

Please sign in to comment.