This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-2.4
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-2.4 by this push:
     new 7f64963  [MINOR][TEST] Expand spark-submit test to allow python2/3 
executable
7f64963 is described below

commit 7f64963c9d951585f585f98667f09e9ddbe63731
Author: Sean Owen <[email protected]>
AuthorDate: Thu Apr 18 14:30:22 2019 -0700

    [MINOR][TEST] Expand spark-submit test to allow python2/3 executable
    
    ## What changes were proposed in this pull request?
    
    This backports a tiny part of another change:
    
https://github.com/apache/spark/commit/4bdfda92a1c570d7a1142ee30eb41e37661bc240#diff-3c792ce7265b69b448a984caf629c96bR161
    ... which just works around the possibility that the local python 
interpreter is 'python3' or 'python2' when running the spark-submit tests.
    
    I'd like to backport to 2.3 too.
    
    This otherwise prevents this test from passing on my mac, though I have a 
custom install with brew. But may affect others.
    
    ## How was this patch tested?
    
    Existing tests.
    
    Closes #24407 from srowen/Python23check.
    
    Authored-by: Sean Owen <[email protected]>
    Signed-off-by: Dongjoon Hyun <[email protected]>
---
 .../java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java
 
b/launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java
index b343094..e694e90 100644
--- 
a/launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java
+++ 
b/launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java
@@ -158,7 +158,7 @@ public class SparkSubmitCommandBuilderSuite extends 
BaseSuite {
 
     Map<String, String> env = new HashMap<>();
     List<String> cmd = buildCommand(sparkSubmitArgs, env);
-    assertEquals("python", cmd.get(cmd.size() - 1));
+    assertTrue(Arrays.asList("python", "python2", 
"python3").contains(cmd.get(cmd.size() - 1)));
     assertEquals(
       String.format("\"%s\" \"foo\" \"%s\" \"bar\" \"%s\"",
         parser.MASTER, parser.DEPLOY_MODE, 
SparkSubmitCommandBuilder.PYSPARK_SHELL_RESOURCE),


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to