SLIDER-270 more work on the double flex test case

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

Branch: refs/heads/feature/SLIDER-151_REST_API
Commit: 291a82ef1e99a6590e245ebce7c0d1d861eac263
Parents: 040ef79
Author: Steve Loughran <ste...@apache.org>
Authored: Tue Aug 5 21:09:00 2014 +0100
Committer: Steve Loughran <ste...@apache.org>
Committed: Tue Aug 5 21:09:00 2014 +0100

----------------------------------------------------------------------
 .../org/apache/slider/test/YarnMiniClusterTestBase.groovy     | 7 ++++---
 .../hbase/minicluster/HBaseMiniClusterTestBase.groovy         | 1 +
 .../minicluster/flexing/TestClusterFlexDownMultiple.groovy    | 4 ++--
 3 files changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/291a82ef/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy
----------------------------------------------------------------------
diff --git 
a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy
 
b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy
index 49dc02e..ed66190 100644
--- 
a/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy
+++ 
b/slider-core/src/test/groovy/org/apache/slider/test/YarnMiniClusterTestBase.groovy
@@ -136,6 +136,9 @@ public abstract class YarnMiniClusterTestBase extends 
ServiceLauncherBaseTest {
     }
   } 
 
+  protected String buildClustername(String clustername) {
+    return clustername ?: createClusterName()
+  }
 
   /**
    * Create the cluster name from the method name and an auto-incrementing
@@ -240,9 +243,7 @@ public abstract class YarnMiniClusterTestBase extends 
ServiceLauncherBaseTest {
     conf.setInt(YarnConfiguration.RM_SCHEDULER_MINIMUM_ALLOCATION_MB, 64);
     conf.set(YarnConfiguration.RM_SCHEDULER, FIFO_SCHEDULER);
     SliderUtils.patchConfiguration(conf)
-    if (!name) {
-      name = createClusterName()
-    }
+    name = buildClustername(name)
     miniCluster = new MiniYARNCluster(name, noOfNodeManagers, numLocalDirs, 
numLogDirs)
     miniCluster.init(conf)
     miniCluster.start();

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/291a82ef/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
----------------------------------------------------------------------
diff --git 
a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
 
b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
index c9f0a4f..6a69e17 100644
--- 
a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
+++ 
b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/HBaseMiniClusterTestBase.groovy
@@ -284,6 +284,7 @@ public abstract class HBaseMiniClusterTestBase extends 
YarnZKMiniClusterTestBase
       int workers,
       int workerFlexTarget,
       boolean testHBaseAfter) {
+    clustername = buildClustername(clustername);
     SliderClient sliderClient = startHBaseCluster(clustername, masters, 
workers)
 
     //now flex

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/291a82ef/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlexDownMultiple.groovy
----------------------------------------------------------------------
diff --git 
a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlexDownMultiple.groovy
 
b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlexDownMultiple.groovy
index 43ade73..97a9b35 100644
--- 
a/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlexDownMultiple.groovy
+++ 
b/slider-providers/hbase/slider-hbase-provider/src/test/groovy/org/apache/slider/providers/hbase/minicluster/flexing/TestClusterFlexDownMultiple.groovy
@@ -34,13 +34,13 @@ class TestClusterFlexDownMultiple extends 
HBaseMiniClusterTestBase {
   @Test
   public void testClusterFlexDownMultiple() throws Throwable {
     def clusterName = createClusterName();
-    SliderClient sliderClient = startHBaseCluster(clusterName, 1, 4)
+    SliderClient sliderClient = startHBaseCluster(clusterName, 1, 3)
     
     assert flexCluster(
         sliderClient,
         clusterName,
         1,
-        3,
+        2,
         true)
 
     assert flexCluster(

Reply via email to