Repository: incubator-slider
Updated Branches:
  refs/heads/feature/SLIDER-82-pass-3.1 4cc0d0dbd -> 77aeb2539


SLIDER-994 node information map to list node entries by role name, not 
priority: test failure shows this doesn't hold yet


Project: http://git-wip-us.apache.org/repos/asf/incubator-slider/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-slider/commit/134c8d57
Tree: http://git-wip-us.apache.org/repos/asf/incubator-slider/tree/134c8d57
Diff: http://git-wip-us.apache.org/repos/asf/incubator-slider/diff/134c8d57

Branch: refs/heads/feature/SLIDER-82-pass-3.1
Commit: 134c8d57a19aedb9a54358bb05ff7a6d1621aed7
Parents: 4cc0d0d
Author: Steve Loughran <[email protected]>
Authored: Sat Nov 21 21:18:10 2015 +0000
Committer: Steve Loughran <[email protected]>
Committed: Sat Nov 21 21:18:10 2015 +0000

----------------------------------------------------------------------
 .../apache/slider/providers/agent/TestAgentAAEcho.groovy    | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/134c8d57/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestAgentAAEcho.groovy
----------------------------------------------------------------------
diff --git 
a/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestAgentAAEcho.groovy
 
b/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestAgentAAEcho.groovy
index 890ce82..e193563 100644
--- 
a/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestAgentAAEcho.groovy
+++ 
b/slider-core/src/test/groovy/org/apache/slider/providers/agent/TestAgentAAEcho.groovy
@@ -22,6 +22,7 @@ import groovy.transform.CompileStatic
 import groovy.util.logging.Slf4j
 import org.apache.slider.api.ResourceKeys
 import org.apache.slider.api.RoleKeys
+import org.apache.slider.api.StatusKeys
 import org.apache.slider.client.SliderClient
 import org.apache.slider.client.rest.SliderApplicationApiRestClient
 import org.apache.slider.common.SliderXmlConfKeys
@@ -154,8 +155,9 @@ class TestAgentAAEcho extends TestAgentEcho {
 
     sliderClient.flex(clustername, [(rolename): requested]);
     waitForRoleCount(sliderClient, onlyOneEcho, 1000)
-    sleep(5000)
+    sleep(4000)
     def now = System.currentTimeMillis();
+    sleep(1000)
 
     def componentInformation = ipcClient.getComponent(rolename)
     assert !ipcClient.getComponent(rolename).isAARequestOutstanding
@@ -165,7 +167,7 @@ class TestAgentAAEcho extends TestAgentEcho {
     cd = sliderClient.getClusterDescription()
     assert !cd.liveness.allRequestsSatisfied
     assert cd.liveness.requestsOutstanding == requested - 1
-    assert cd.createTime >= now
+    assert now <= Long.valueOf(cd.info.get(StatusKeys.INFO_STATUS_TIME_MILLIS))
     assert expectedPending == cd.getRoleOptInt(rolename, 
RoleKeys.ROLE_PENDING_AA_INSTANCES, -1)
 
     // while running, flex it to size = 1
@@ -185,7 +187,8 @@ class TestAgentAAEcho extends TestAgentEcho {
 
     def nodes = sliderClient.listYarnClusterNodes(new ActionNodesArgs())
     assert nodes.size() == 1
-    assert nodes[0].entries[rolename].live == 1
+    def activeNodes = sliderClient.listInstanceNodes(clustername, new 
ActionNodesArgs())
+    assert activeNodes[0].entries[rolename] && 
activeNodes[0].entries[rolename].live == 1
   }
 
   protected void queryRestAPI(SliderClient sliderClient, Map<String, Integer> 
roles, String proxyAM) {

Reply via email to