UserRestServiceTest.testWriteALotOfUsers() fails fairly often
Description
This test is a flapper. I'm going to try and track down why it is failing so much.
Acceptance / Success Criteria
None
Lucidchart Diagrams
Activity
Seth Leger September 26, 2014 at 3:17 PM
I fixed this by making the auth fields into ThreadLocal variables and ran it a few hundred times to make sure that the issue was fixed. Marking as fixed.
Seth Leger September 24, 2014 at 2:42 PM
Yep, this is a thread safety issue in AbstractSpringJerseyRestTestCase. We are reusing the credentials stored in the super class of the test in multiple threads. I'll fix this by making the credentials ThreadLocal variables.
You also get this exception sometimes:
Seth Leger September 23, 2014 at 8:49 PM
This is strange because the REST service is just asking the Spring Security context for role membership for the current user. There must be some thread-safety issue here because the other 20 or so requests seem to work perfectly fine and indeed, the test usually executes successfully.
This test is a flapper. I'm going to try and track down why it is failing so much.