Repository: zeppelin
Updated Branches:
  refs/heads/master 5632d2cd9 -> 806831454


ZEPPELIN-3428. Flaky test: SparkInterpreterLauncherTest

### What is this PR for?

SparkInterpreterLauncherTest will fail when you already have enviroment 
variable setup in the machine where you run the unit test.

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Task

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3428

### How should this be tested?
* CI pass

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No

Author: Jeff Zhang <zjf...@apache.org>

Closes #2943 from zjffdu/ZEPPELIN-3428 and squashes the following commits:

6b89b22 [Jeff Zhang] ZEPPELIN-3428. Flaky test: SparkInterpreterLauncherTest


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

Branch: refs/heads/master
Commit: 806831454502d052f504d162bf6d6ab0aad02920
Parents: 5632d2c
Author: Jeff Zhang <zjf...@apache.org>
Authored: Wed Apr 25 08:31:56 2018 +0800
Committer: Jeff Zhang <zjf...@apache.org>
Committed: Wed Apr 25 17:43:38 2018 +0800

----------------------------------------------------------------------
 .../launcher/SparkInterpreterLauncherTest.java            | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/80683145/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
----------------------------------------------------------------------
diff --git 
a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
 
b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
index 0bd79af..82f9e2a 100644
--- 
a/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
+++ 
b/zeppelin-zengine/src/test/java/org/apache/zeppelin/interpreter/launcher/SparkInterpreterLauncherTest.java
@@ -57,7 +57,7 @@ public class SparkInterpreterLauncherTest {
     
assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
     
assertTrue(interpreterProcess.getLocalRepoDir().endsWith("/local-repo/groupId"));
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), 
interpreterProcess.getInterpreterRunner());
-    assertEquals(2, interpreterProcess.getEnv().size());
+    assertTrue(interpreterProcess.getEnv().size() >= 2);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals(" --master local[*] --conf spark.files='file_1' --conf 
spark.jars='jar_1'", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
   }
@@ -82,7 +82,7 @@ public class SparkInterpreterLauncherTest {
     
assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
     
assertTrue(interpreterProcess.getLocalRepoDir().endsWith("/local-repo/groupId"));
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), 
interpreterProcess.getInterpreterRunner());
-    assertEquals(2, interpreterProcess.getEnv().size());
+    assertTrue(interpreterProcess.getEnv().size() >= 2);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals(" --master yarn-client --conf spark.files='file_1' --conf 
spark.jars='jar_1' --conf spark.yarn.isPython=true", 
interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
   }
@@ -108,7 +108,7 @@ public class SparkInterpreterLauncherTest {
     
assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
     
assertTrue(interpreterProcess.getLocalRepoDir().endsWith("/local-repo/groupId"));
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), 
interpreterProcess.getInterpreterRunner());
-    assertEquals(2, interpreterProcess.getEnv().size());
+    assertTrue(interpreterProcess.getEnv().size() >= 2);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals(" --master yarn --conf spark.files='file_1' --conf 
spark.jars='jar_1' --conf spark.submit.deployMode='client' --conf 
spark.yarn.isPython=true", 
interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
   }
@@ -133,7 +133,7 @@ public class SparkInterpreterLauncherTest {
     
assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
     
assertTrue(interpreterProcess.getLocalRepoDir().endsWith("/local-repo/groupId"));
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), 
interpreterProcess.getInterpreterRunner());
-    assertEquals(3, interpreterProcess.getEnv().size());
+    assertTrue(interpreterProcess.getEnv().size() >= 3);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals("true", 
interpreterProcess.getEnv().get("ZEPPELIN_SPARK_YARN_CLUSTER"));
     assertEquals(" --master yarn-cluster --files 
.//conf/log4j_yarn_cluster.properties --conf spark.files='file_1' --conf 
spark.jars='jar_1' --conf spark.yarn.isPython=true", 
interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));
@@ -161,7 +161,7 @@ public class SparkInterpreterLauncherTest {
     
assertTrue(interpreterProcess.getInterpreterDir().endsWith("/interpreter/spark"));
     
assertTrue(interpreterProcess.getLocalRepoDir().endsWith("/local-repo/groupId"));
     assertEquals(zConf.getInterpreterRemoteRunnerPath(), 
interpreterProcess.getInterpreterRunner());
-    assertEquals(3, interpreterProcess.getEnv().size());
+    assertTrue(interpreterProcess.getEnv().size() >= 3);
     assertEquals("/user/spark", interpreterProcess.getEnv().get("SPARK_HOME"));
     assertEquals("true", 
interpreterProcess.getEnv().get("ZEPPELIN_SPARK_YARN_CLUSTER"));
     assertEquals(" --master yarn --files .//conf/log4j_yarn_cluster.properties 
--conf spark.files='file_1' --conf spark.jars='jar_1' --conf 
spark.submit.deployMode='cluster' --conf spark.yarn.isPython=true --proxy-user 
user1", interpreterProcess.getEnv().get("ZEPPELIN_SPARK_CONF"));

Reply via email to