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

Fixing flaky tests in RedditScopeBuilderTest and KeyValueFormatterTest #158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

allabadigarvita
Copy link

The following tests are flaky because of the underlying implementation of KeyValueFormatter.format() and builder.build() methods. Calling these methods twice can return the opposite values every time for the string values it is being compared to. Instead extracting out the method call ensures that one of the values in the assert condition will be satisfied.

Tests:
com.github.jreddit.request.util.KeyValueFormatterTest.testFormatMultiple
com.github.jreddit.request.util.KeyValueFormatterTest.testFormatMultipleUTF8
com.github.jreddit.oauth.param.RedditScopeBuilderTest.testAddMultiple

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.

None yet

1 participant