ryang-bgl opened a new issue, #14351:
URL: https://github.com/apache/grails-core/issues/14351

   When using @SpringBean in different SpringBootTest, spring will create a 
separate context for each test since spring doesn't know if those two tests 
share the same mock beans. This caused "No Session found for current thread" 
when running two tests together.
   
   Please clone the following repo to reproduce it.
   [email protected]:ruiyang/gorm-spring-boot-hibernate-session-error.git
   or
   
[https://github.com/ruiyang/gorm-spring-boot-hibernate-session-error](https://github.com/ruiyang/gorm-spring-boot-hibernate-session-error)
   
   There are two tests:
   VehicleServiceTest
   ManufacturerServiceTest
   
   test passes when running each individually
   ```
   ./gradlew test --tests *ManufacturerServiceTest*
   ./gradlew test --tests *VehicleServiceTest*
   ```
   
   test will fail when running together
   
   `./gradlew test`
   
   Please help!
   Thanks
   


-- 
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