Skip to content
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

Fix flaky test TestProblemsetFilters::test_filters. Closes #440 #450

Merged
merged 1 commit into from
Jan 9, 2025

Conversation

stopnoanime
Copy link
Contributor

The problem

This test used to check for the presence of a problem by asserting that the response HTML contained the problem name.
However, the response also included an HTML form with a generated CSRF token, sometimes this token would contain the problem name (test problems have short names like aaa so it wasn't that rare).
This caused the test to randomly fail.

Solution

Now the test expliclitly searches for a HTML tag with the necessary problem name.

Copy link
Contributor

@twalen twalen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks Good. But I wonder how many the same kind of errors still remain in the code.

@stopnoanime stopnoanime merged commit c4e76d6 into sio2project:master Jan 9, 2025
1 check passed
@Iteron-dev Iteron-dev mentioned this pull request Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants