Bug report
Hi, I recently upgraded to Greenwich RC1 and stumbled upon a weird issue (which did not happen with Finchley).
In a Controller test (WebTestClient) I have 2 tests doing the exact same thing (getting current span back). First test to be executed works fine but second fails because brave.Tracer#currentSpan() is null. This only happens if I bring spring-security-test in the mix.
My first naive guess is that it might come from ReactorContextTestExecutionListener but haven't had time to investigate further.
Reproducer is here
Thanks
The workaround is to use DirtiesContext
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
Other than that I guess we'll need help from @smaldini or @bsideup :|
or @simonbasle :)
@beltram could you please share your exact Spring Security's version?
I remember some issues with testing + Spring Security:
https://github.com/spring-projects/spring-security/issues/6075
@bsideup I'm using Spring Security 5.1.2.RELEASE
@beltram ok, the issue I referred was fixed in Spring Security Test 5.1.3.RELEASE. Could you please try it? If I understand correctly, only the testing module needs to be updated, in case you don't want to update the whole Spring Security framework
I confirm it works back with spring-security-test:5.1.3-BUILD-SNAPSHOT
Thanks a lot @bsideup
Cool! I'm closing the issue. Thanks @bsideup, you're the best!
Most helpful comment
I confirm it works back with spring-security-test:5.1.3-BUILD-SNAPSHOT
Thanks a lot @bsideup