Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Abandoned
-
3.6.0
-
None
-
Unknown
Description
After upgrading to 3.6.0 existing Spring Boot tests in my codebase started to fail. After some investigation I discovered that this is due to my unit tests having a single instance per class as configured using JUnit's
@TestInstance(TestInstance.Lifecycle.PER_CLASS)
Some changes were introduced in a recent commit that affected the existing behaviour in CamelSpringBootExecutionListener: https://github.com/apache/camel/commit/efc34ab2b98f3697ebb482cf1645fda6f0794797
I have remediated my tests by running the following code in a JUnit BeforeEach method within a base test class:
// Kotlin @BeforeEach fun init() { SpringCamelContext.setNoStart(false) camelContext.start() }
I am currently looking for a more permanent solution to this issue that properly supports single instance JUnit5 Test classes.