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

[BUG] ClientFilterTest and ProviderFilterTest have order dependent tests #3271

Open
SaaiVenkat opened this issue Nov 17, 2023 · 0 comments · May be fixed by #3272
Open

[BUG] ClientFilterTest and ProviderFilterTest have order dependent tests #3271

SaaiVenkat opened this issue Nov 17, 2023 · 0 comments · May be fixed by #3272
Labels
area/test Issue or PR related to test cases

Comments

@SaaiVenkat
Copy link
Contributor

SaaiVenkat commented Nov 17, 2023

Issue Description

Type: bug report

Describe what happened

Describe what you expected to happen

  • The unit tests in com.alibaba.csp.sentinel.adapter.jaxrs.ClientFilterTest and com.alibaba.csp.sentinel.adapter.jaxrs.ProviderFilterTest should pass when run in any order

How to reproduce it (as minimally and precisely as possible)

  • In com.alibaba.csp.sentinel.adapter.jaxrs.ClientFilterTest, run the following unit tests in order
    • testClientCustomFallback()
    • testClientFallback()
  • In com.alibaba.csp.sentinel.adapter.jaxrs.ProviderFilterTest, run the following unit tests in order
    • testCustomFallback()
    • testDefaultFallback() or testCustomRequestOriginParser()
  • Running the tests in the above manner will produce java.lang.AssertionError
java.lang.AssertionError: 
Expected :429
Actual   :200
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.failNotEquals(Assert.java:834)
	at org.junit.Assert.assertEquals(Assert.java:645)
	at org.junit.Assert.assertEquals(Assert.java:631)
	at com.alibaba.csp.sentinel.adapter.jaxrs.ClientFilterTest.testClientFallback(ClientFilterTest.java:224)
  • The exact stacktrace will vary based on the second test executed

Tell us your environment

  • Sentinel: 1.8.6
  • OS: Mac OS X 14.0 aarch64
  • Java: 17.0.9 or 1.8.0_381

Anything else we need to know?

@sczyh30 sczyh30 added the area/test Issue or PR related to test cases label Dec 1, 2023
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 a pull request may close this issue.

2 participants