Skip to content
This repository has been archived by the owner on Jul 25, 2020. It is now read-only.

Commit

Permalink
group name in test was too long, making dns exceptions
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Cole committed Jun 1, 2012
1 parent 8159b66 commit 160cd27
Showing 1 changed file with 11 additions and 10 deletions.
Expand Up @@ -419,30 +419,31 @@ public void testCreateAnotherNodeWithANewContextToEnsureSharedMemIsntRequired()

@Test(enabled = true, dependsOnMethods = "testCompareSizes")
public void testConcurrentUseOfComputeServiceToCreateNodes() throws Exception {
final long timeoutMs = 20*60*1000;
final long timeoutMs = 20 * 60 * 1000;
List<String> groups = new ArrayList<String>();
List<ListenableFuture<NodeMetadata>> futures = new ArrayList<ListenableFuture<NodeMetadata>>();
ListeningExecutorService executor = MoreExecutors.listeningDecorator(context.utils().userExecutor());

try {
for (int i = 0; i < 2; i++) {
final int groupNum = i;
final String group = "groupconcurrent"+groupNum;
final String group = "twin" + groupNum;
groups.add(group);

ListenableFuture<NodeMetadata> future = executor.submit(new Callable<NodeMetadata>() {
public NodeMetadata call() throws Exception {
NodeMetadata node = getOnlyElement(client.createNodesInGroup(group, 1,
inboundPorts(22, 8080).blockOnPort(22, 300+groupNum)));
getAnonymousLogger().info("Started node "+node.getId());
NodeMetadata node = getOnlyElement(client.createNodesInGroup(group, 1, inboundPorts(22, 8080)
.blockOnPort(22, 300 + groupNum)));
getAnonymousLogger().info("Started node " + node.getId());
return node;
}});
}
});
futures.add(future);
}

ListenableFuture<List<NodeMetadata>> compoundFuture = Futures.allAsList(futures);
compoundFuture.get(timeoutMs, TimeUnit.MILLISECONDS);

} finally {
for (String group : groups) {
client.destroyNodesMatching(inGroup(group));
Expand Down

0 comments on commit 160cd27

Please sign in to comment.