Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ public void run()

Thread.currentThread().setName( getClass().getSimpleName() + "." + name.getMethodName() );

EmbeddedCassandraServerHelper.startEmbeddedCassandra();
logger.debug( "Embedded Cassandra server started" );

fixture = newServerFixture();
fixture.start();

Expand All @@ -120,9 +123,6 @@ public void run()
throw new IllegalStateException( "server fixture failed to boot.", status.getError() );
}

EmbeddedCassandraServerHelper.startEmbeddedCassandra();
logger.debug( "Embedded Cassandra server started" );

client = createIndyClient();
}
catch ( Throwable t )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
import java.util.concurrent.Future;

import static org.hamcrest.CoreMatchers.equalTo;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.jgroups.util.Util.assertTrue;
import static org.junit.Assert.assertThat;

/**
Expand Down Expand Up @@ -63,32 +61,40 @@
public class GroupMembershipAddMayDisruptMetadataTest
extends GroupMembershipChangeUpdateMetadataTest
{

public static class BMHelper {}

/* @formatter:off */
@BMRules( rules = {
@BMRule(
name = "Create Rendezvous",
targetClass = "MavenMetadataGenerator",
name = "Prepare",
targetClass = "GroupMembershipAddMayDisruptMetadataTest$BMHelper",
targetMethod = "<init>",
targetLocation = "ENTRY",
action = "createRendezvous(\"myRendezvous\", 2)" ),
targetLocation = "EXIT",
action = "debug(\"createRendezvous...\"); createRendezvous(\"myRendezvous\", 2); flag(\"prepared\")" ),
@BMRule(
name = "Wait after generateGroupFileContent",
targetClass = "MavenMetadataGenerator",
targetMethod = "generateGroupFileContent",
targetLocation = "EXIT",
condition = "flagged(\"prepared\")",
action = "debug(\"generateGroupFileContent waiting...\"); rendezvous(\"myRendezvous\"); debug(\"generateGroupFileContent go.\")" ),
@BMRule(
name = "Wait after storeArtifactStore",
targetClass = "AbstractStoreDataManager",
targetMethod = "storeArtifactStore",
targetLocation = "EXIT",
condition = "flagged(\"prepared\")",
action = "debug(\"storeArtifactStore waiting...\"); rendezvous(\"myRendezvous\"); debug(\"storeArtifactStore go.\")" ),
} )
/* @formatter:on */
@Test
@Category( BytemanTest.class )
public void run()
throws Exception
{
prepare();
BMHelper bmHelper = new BMHelper();

ExecutorService fixedPool = Executors.newFixedThreadPool( 2 );

Expand All @@ -100,7 +106,7 @@ public void run()
Callable<String> groupAddTask = new GroupAddCallable( remoteRepositoryC.getKey() );
Future<String> user2 = fixedPool.submit( groupAddTask );

Thread.sleep( 2000 );
//Thread.sleep( 2000 );

String metadata = user1.get();
String retCode = user2.get();
Expand Down