Skip to content

infra: remove flaky assertion in test_integ_history_server #2008

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Dec 2, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions tests/integ/test_spark_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,19 +302,13 @@ def test_integ_history_server(spark_py_processor, sagemaker_session):
sagemaker_session=sagemaker_session,
)

# sleep 3 seconds to avoid s3 eventual consistency issue
time.sleep(3)
spark_py_processor.start_history_server(spark_event_logs_s3_uri=spark_event_logs_s3_uri)

try:
response = _request_with_retry(HISTORY_SERVER_ENDPOINT)
assert response.status == 200

# spark has redirect behavior, this request verify that page navigation works with redirect
response = _request_with_retry(f"{HISTORY_SERVER_ENDPOINT}{SPARK_APPLICATION_URL_SUFFIX}")
assert response.status == 200

html_content = response.data.decode("utf-8")
assert "Completed Jobs (4)" in html_content
assert "collect at /opt/ml/processing/input/code/test_long_duration.py:32" in html_content
finally:
spark_py_processor.terminate_history_server()

Expand Down