jonnybot0 opened a new pull request, #302:
URL: https://github.com/apache/groovy-geb/pull/302

   After a bit of digging, I think I have figured out why the 
`ParallelExecutionTest` fails.
   
   Basically, clearing the WebDriver cache in BeforeAll or AfterAll lifecycle 
methods on JUnit tests breaks the fundamental assumption made by the 
GebTestManager:
   
   ```
   /**
    * This implementation assumes that a thread is reserved for one test 
execution at least from
    * {@code beforeTest} until {@code afterTest}, and that {@code 
beforeTestClass} and {@code afterTestClass}
    * are called on the same thread, even if the thread executed some test 
inbetween.
    * There should also only be one instance for all tests of a class even if 
run in parallel.
    */
   ```
   
   Since the thread from BeforeAll and AfterAll can, in practice, get reused by 
a test running concurrently in JUnit 5, the ThreadLocal driver cache is not 
safe.
   
   Thanks to @cbmarcum and @Vampire for their time and attention on this issue. 
Would love a review, if you can, particularly from @Vampire since he authored 
the original parallel support and may understand JUnit 5's parallelism and test 
lifecycle better than me.
   
   I've also been unable to reproduce a failure on `ParallelExecutionSpec` 
since merging the PR that reverted the distinct caches, so I'm re-enabling that 
to test it out in CI on the grounds that it's related and _should_ be working.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to