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 order dependent tests in ProviderFilterTest and ClientFilterTest #3272

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SaaiVenkat
Copy link
Contributor

@SaaiVenkat SaaiVenkat commented Nov 17, 2023

Describe what this PR does / why we need it

  • In sentinel-adapter/sentinel-reactor-adapter, the unit tests ProviderFilterTest.testDefaultFallback(), ProviderFilterTest.testCustomRequestOriginParser(), and ClientFilterTest.testClientFallback() will fail when run after the unit tests ProviderFilterTest.testCustomFallback() or ClientFilterTest.testClientCustomFallback() because it pollutes state shared among tests.
  • It may be good to clean this state pollution so that some other tests do not fail in the future due to the shared state polluted by this test.

Does this pull request fix one issue?

Fixes #3271

Describe how you did it

  • As mentioned in the issue, I have cleaned up the polluted state SentinelJaxRsConfig.jaxRsFallback to its default value in the cleanUp() method of the respective test classes.

Describe how to verify it

  • With the proposed fix, the test does not pollute the shared state.
  • All the tests pass when run in the any order.

@CLAassistant
Copy link

CLAassistant commented Nov 17, 2023

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test Issue or PR related to test cases
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] ClientFilterTest and ProviderFilterTest have order dependent tests
3 participants