diff --git testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java index 8b82497bdaf43694e0e1552e125b5ffdce40f56c..5cfb24cb304404be4066c974d4eaada6293c2139 100644 --- testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java +++ testutils/ptest2/src/main/java/org/apache/hive/ptest/execution/context/CloudExecutionContextProvider.java @@ -223,6 +223,16 @@ public synchronized ExecutionContext createExecutionContext() LOG.info("Attempting to create " + numRequired + " nodes"); try { result.addAll(mCloudComputeService.createNodes(Math.min(mMaxHostsPerCreateRequest, numRequired))); + + Set newAddresses = new HashSet(); + for (NodeMetadata node : result) { + newAddresses.addAll(node.getPublicAddresses()); + } + synchronized (mTerminatedHosts) { + for (String newAddress : newAddresses) { + mTerminatedHosts.remove(newAddress); + } + } } catch (RunNodesException e) { error = true; LOG.warn("Error creating nodes", e);