Skip to content

Commit 384f846

Browse files
authored
[SPARK-427] fix strict mode in python tests (apache#130)
1 parent 30b6606 commit 384f846

2 files changed

Lines changed: 4 additions & 5 deletions

File tree

bin/test.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ check_env() {
1515
-o -z "$S3_BUCKET" \
1616
-o -z "$S3_PREFIX" \
1717
-o -z "$TEST_JAR_PATH" \
18-
-o -z "$COMMONS_DIR"]; then
18+
-o -z "$COMMONS_DIR" ]; then
1919
echo "Missing required env. See check in ${BIN_DIR}/test.sh."
2020
echo "Environment:"
2121
env

tests/test.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -266,10 +266,9 @@ def _run_tests(app_url, app_args, expected_output, args=[]):
266266

267267
def _submit_job(app_url, app_args, args=[]):
268268
if _is_strict():
269-
config['spark.mesos.driverEnv.MESOS_MODULES'] = \
270-
'file:///opt/mesosphere/etc/mesos-scheduler-modules/dcos_authenticatee_module.json'
271-
config['spark.mesos.driverEnv.MESOS_AUTHENTICATEE'] = 'com_mesosphere_dcos_ClassicRPCAuthenticatee'
272-
config['spark.mesos.principal'] = 'service-acct'
269+
args += ["--conf", 'spark.mesos.driverEnv.MESOS_MODULES=file:///opt/mesosphere/etc/mesos-scheduler-modules/dcos_authenticatee_module.json']
270+
args += ["--conf", 'spark.mesos.driverEnv.MESOS_AUTHENTICATEE=com_mesosphere_dcos_ClassicRPCAuthenticatee']
271+
args += ["--conf", 'spark.mesos.principal=service-acct']
273272
args_str = ' '.join(args + ["--conf", "spark.driver.memory=2g"])
274273
submit_args = ' '.join([args_str, app_url, app_args])
275274
cmd = 'dcos --log-level=DEBUG spark --verbose run --submit-args="{0}"'.format(submit_args)

0 commit comments

Comments
 (0)