@Test(enabled = true, dependsOnMethods = "testCompareSizes")
public void testConcurrentUseOfComputeServiceToCreateNodes() throws Exception {
final long timeoutMs = 20 * 60 * 1000;
List<String> groups = Lists.newArrayList();
List<ListenableFuture<NodeMetadata>> futures = Lists.newArrayList();
ListeningExecutorService userExecutor = MoreExecutors.listeningDecorator(context.utils().userExecutor());
try {
for (int i = 0; i < 2; i++) {
final int groupNum = i;
final String group = "twin" + groupNum;
groups.add(group);
template = buildTemplate(client.templateBuilder());
template.getOptions().inboundPorts(22, 8080).blockOnPort(22, 300 + groupNum);
ListenableFuture<NodeMetadata> future = userExecutor.submit(new Callable<NodeMetadata>() {
public NodeMetadata call() throws Exception {
NodeMetadata node = getOnlyElement(client.createNodesInGroup(group, 1, template));
getAnonymousLogger().info("Started node " + node.getId());
return node;
}