Skip to content

Commit 7f64963

Browse files
srowendongjoon-hyun
authored andcommitted
[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: 4bdfda9#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 <sean.owen@databricks.com> Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
1 parent 7a8efc8 commit 7f64963

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

launcher/src/test/java/org/apache/spark/launcher/SparkSubmitCommandBuilderSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ public void testPySparkLauncher() throws Exception {
158158

159159
Map<String, String> env = new HashMap<>();
160160
List<String> cmd = buildCommand(sparkSubmitArgs, env);
161-
assertEquals("python", cmd.get(cmd.size() - 1));
161+
assertTrue(Arrays.asList("python", "python2", "python3").contains(cmd.get(cmd.size() - 1)));
162162
assertEquals(
163163
String.format("\"%s\" \"foo\" \"%s\" \"bar\" \"%s\"",
164164
parser.MASTER, parser.DEPLOY_MODE, SparkSubmitCommandBuilder.PYSPARK_SHELL_RESOURCE),

0 commit comments

Comments
 (0)