Skip to content

Commit dc29b02

Browse files
infra: remove flaky assertion in test_integ_history_server (#2008)
* reset command for each run invocation * remove response assertion on history server subpage Co-authored-by: Ajay Karpur <[email protected]>
1 parent 6ad50e2 commit dc29b02

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

tests/integ/test_spark_processing.py

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -302,19 +302,13 @@ def test_integ_history_server(spark_py_processor, sagemaker_session):
302302
sagemaker_session=sagemaker_session,
303303
)
304304

305+
# sleep 3 seconds to avoid s3 eventual consistency issue
306+
time.sleep(3)
305307
spark_py_processor.start_history_server(spark_event_logs_s3_uri=spark_event_logs_s3_uri)
306308

307309
try:
308310
response = _request_with_retry(HISTORY_SERVER_ENDPOINT)
309311
assert response.status == 200
310-
311-
# spark has redirect behavior, this request verify that page navigation works with redirect
312-
response = _request_with_retry(f"{HISTORY_SERVER_ENDPOINT}{SPARK_APPLICATION_URL_SUFFIX}")
313-
assert response.status == 200
314-
315-
html_content = response.data.decode("utf-8")
316-
assert "Completed Jobs (4)" in html_content
317-
assert "collect at /opt/ml/processing/input/code/test_long_duration.py:32" in html_content
318312
finally:
319313
spark_py_processor.terminate_history_server()
320314

0 commit comments

Comments
 (0)