Unverified Commit 5e318d0c authored by Fabien Viale's avatar Fabien Viale Committed by GitHub
Browse files

Merge pull request #3984 from fviale/master

Recover tests : add wait method when acquiring nodes
parents 95ea3788 953753d7
...@@ -121,6 +121,7 @@ public class RecoverDefaultInfrastructureTest extends RMFunctionalTest { ...@@ -121,6 +121,7 @@ public class RecoverDefaultInfrastructureTest extends RMFunctionalTest {
RMTHelper.log("Acquiring " + NODE_NUMBER + " nodes with token=" + TOKEN); RMTHelper.log("Acquiring " + NODE_NUMBER + " nodes with token=" + TOKEN);
NodeSet nodeSet = this.rmHelper.getResourceManager().getNodes(criteria); NodeSet nodeSet = this.rmHelper.getResourceManager().getNodes(criteria);
Assert.assertEquals(NODE_NUMBER, nodeSet.size()); Assert.assertEquals(NODE_NUMBER, nodeSet.size());
this.rmHelper.waitForAnyMultipleNodeEvent(RMEventType.NODE_STATE_CHANGED, NODE_NUMBER);
this.rmHelper.getResourceManager().releaseNodes(nodeSet); this.rmHelper.getResourceManager().releaseNodes(nodeSet);
this.rmHelper.waitForAnyMultipleNodeEvent(RMEventType.NODE_STATE_CHANGED, NODE_NUMBER); this.rmHelper.waitForAnyMultipleNodeEvent(RMEventType.NODE_STATE_CHANGED, NODE_NUMBER);
} }
......
...@@ -178,6 +178,7 @@ public class RecoverLocalInfrastructureTest extends RMFunctionalTest { ...@@ -178,6 +178,7 @@ public class RecoverLocalInfrastructureTest extends RMFunctionalTest {
RMTHelper.log("Acquiring " + NODE_NUMBER + " nodes with token=" + TOKEN); RMTHelper.log("Acquiring " + NODE_NUMBER + " nodes with token=" + TOKEN);
NodeSet nodeSet = this.rmHelper.getResourceManager().getNodes(criteria); NodeSet nodeSet = this.rmHelper.getResourceManager().getNodes(criteria);
Assert.assertEquals(NODE_NUMBER, nodeSet.size()); Assert.assertEquals(NODE_NUMBER, nodeSet.size());
this.rmHelper.waitForAnyMultipleNodeEvent(RMEventType.NODE_STATE_CHANGED, NODE_NUMBER);
this.rmHelper.getResourceManager().releaseNodes(nodeSet); this.rmHelper.getResourceManager().releaseNodes(nodeSet);
this.rmHelper.waitForAnyMultipleNodeEvent(RMEventType.NODE_STATE_CHANGED, NODE_NUMBER); this.rmHelper.waitForAnyMultipleNodeEvent(RMEventType.NODE_STATE_CHANGED, NODE_NUMBER);
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment