You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@slider.apache.org by st...@apache.org on 2014/11/07 15:40:31 UTC

incubator-slider git commit: SLIDER-201 split environment checks into separate methods for isolated testing

Repository: incubator-slider
Updated Branches:
  refs/heads/develop 7921f1916 -> c5cd55228


SLIDER-201 split environment checks into separate methods for isolated testing


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

Branch: refs/heads/develop
Commit: c5cd552283f9c7be880bafafaca4c4c03b38a61a
Parents: 7921f19
Author: Steve Loughran <st...@apache.org>
Authored: Fri Nov 7 14:40:20 2014 +0000
Committer: Steve Loughran <st...@apache.org>
Committed: Fri Nov 7 14:40:20 2014 +0000

----------------------------------------------------------------------
 .../org/apache/slider/common/tools/SliderUtils.java   | 14 +++++++++++++-
 .../common/tools/TestExecutionEnvironment.groovy      | 10 +++++++++-
 .../slider/common/tools/TestWindowsSupport.groovy     |  2 +-
 3 files changed, 23 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/c5cd5522/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
----------------------------------------------------------------------
diff --git a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
index a8f8608..74e0bfb 100644
--- a/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
+++ b/slider-core/src/main/java/org/apache/slider/common/tools/SliderUtils.java
@@ -1962,10 +1962,22 @@ public final class SliderUtils {
       IOException,
       SliderException {
     maybeVerifyWinUtilsValid(logger);
-    execCommand(OPENSSL, 0, 5000, logger, "OpenSSL", OPENSSL, "version");
+    validatePythonEnv(logger);
+    validateOpenSSLEnv(logger);
+  }
+
+  public static void validateOpenSSLEnv(Logger logger) throws
+      IOException,
+      SliderException {
     execCommand(PYTHON, 0, 5000, logger, "Python", PYTHON, "-V");
   }
 
+  public static void validatePythonEnv(Logger logger) throws
+      IOException,
+      SliderException {
+    execCommand(OPENSSL, 0, 5000, logger, "OpenSSL", OPENSSL, "version");
+  }
+
   /**
    * return the path to the currently running slider command
    *

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/c5cd5522/slider-core/src/test/groovy/org/apache/slider/common/tools/TestExecutionEnvironment.groovy
----------------------------------------------------------------------
diff --git a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestExecutionEnvironment.groovy b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestExecutionEnvironment.groovy
index 5489366..7ca6c49 100644
--- a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestExecutionEnvironment.groovy
+++ b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestExecutionEnvironment.groovy
@@ -32,11 +32,19 @@ class TestExecutionEnvironment extends SliderTestBase {
     SliderUtils.validateSliderClientEnvironment(log)
   }
   
-  
   @Test
   public void testServerEnv() throws Throwable {
     SliderUtils.validateSliderServerEnvironment(log)
   }
   
+  @Test
+  public void testopenSSLEnv() throws Throwable {
+    SliderUtils.validateOpenSSLEnv(log)
+  }
+  
+  @Test
+  public void testValidatePythonEnv() throws Throwable {
+    SliderUtils.validatePythonEnv(log)
+  }
   
 }

http://git-wip-us.apache.org/repos/asf/incubator-slider/blob/c5cd5522/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
----------------------------------------------------------------------
diff --git a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
index 98fa183..61960e6 100644
--- a/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
+++ b/slider-core/src/test/groovy/org/apache/slider/common/tools/TestWindowsSupport.groovy
@@ -176,7 +176,7 @@ class TestWindowsSupport extends SliderTestBase {
     process.init(new Configuration());
     EndOfServiceWaiter waiter = new EndOfServiceWaiter(process);
     process.start();
-    waiter.waitForServiceToStop(5000);
+    waiter.waitForServiceToStop(10000);
     process
   }
 }