Skip to content

Commit c8a5d89

Browse files
fix(e2e): add ResponseNotFound retry to statistics test
The test_statistics_endpoint was flaky because it failed immediately on ResponseNotFound (404) instead of retrying. This happens when the split-descriptive-statistics worker job hasn't completed yet. This follows the established pattern used in test_55_first_rows.py, test_52_search.py, test_53_filter.py, and test_54_rows.py which all use should_retry_x_error_codes=["ResponseNotFound"] for the same reason.
1 parent 7ade8fb commit c8a5d89

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

e2e/tests/test_14_statistics.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ def test_statistics_endpoint(normal_user_public_jsonl_dataset: str) -> None:
1111
relative_url=f"/statistics?dataset={dataset}&config={config}&split={split}",
1212
check_x_revision=True,
1313
dataset=dataset,
14+
should_retry_x_error_codes=["ResponseNotFound"],
15+
# ^ I had 404 errors without it. It should return something else at one point.
1416
)
1517

1618
content = statistics_response.json()

0 commit comments

Comments
 (0)