Skip to content

Commit 30e1d93

Browse files
authored
[SPARK-475] Skip HDFS tests (apache#148)
* [SPARK-475] Skip HDFS tests * Disable HDFS
1 parent 893b8f4 commit 30e1d93

File tree

1 file changed

+14
-7
lines changed

1 file changed

+14
-7
lines changed

tests/utils.py

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ def _init_logging():
2323
HDFS_SERVICE_NAME='hdfs'
2424
SPARK_PACKAGE_NAME='spark'
2525

26-
26+
# Skip HDFS tests until a version of beta-hdfs containing the fix for HDFS-461 is released.
2727
def hdfs_enabled():
28-
return os.environ.get("HDFS_ENABLED") != "false"
28+
return False
29+
# return os.environ.get("HDFS_ENABLED") != "false"
2930

3031

3132
def is_strict():
@@ -126,9 +127,13 @@ def run_tests(app_url, app_args, expected_output, args=[]):
126127
task_id = _submit_job(app_url, app_args, args)
127128
LOGGER.info('Waiting for task id={} to complete'.format(task_id))
128129
shakedown.wait_for_task_completion(task_id)
129-
log = _task_log(task_id)
130-
LOGGER.info("task log: {}".format(log))
131-
assert expected_output in log
130+
stdout = _task_log(task_id)
131+
132+
if expected_output not in stdout:
133+
stderr = _task_log(task_id, "stderr")
134+
LOGGER.error("task stdout: {}".format(stdout))
135+
LOGGER.error("task stderr: {}".format(stderr))
136+
raise Exception("{} not found in stdout".format(expected_output))
132137

133138

134139
def _submit_job(app_url, app_args, args=[]):
@@ -150,8 +155,10 @@ def _submit_job(app_url, app_args, args=[]):
150155
return match.group(1)
151156

152157

153-
def _task_log(task_id):
154-
cmd = "dcos task log --completed --lines=1000 {}".format(task_id)
158+
def _task_log(task_id, filename=None):
159+
cmd = "dcos task log --completed --lines=1000 {}".format(task_id) + \
160+
("" if filename is None else " {}".format(filename))
161+
155162
LOGGER.info("Running {}".format(cmd))
156163
stdout = subprocess.check_output(cmd, shell=True).decode('utf-8')
157164
return stdout

0 commit comments

Comments
 (0)