git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Spring Boot Testing & @DirtiesContext


I have an itch to scratch. Why does my test class require @DirtiesContext
to avoid a stack trace telling me that ActiveMQ was never started and so it
cannot be stopped after my test completes?

Context:

@RunWith(CamelSpringBootRunner.class)
@SpringBootTest
@MockEndpoints
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
public class FooTest {
...
}

Thanks,

James


( ! ) Warning: include(msgfooter.php): failed to open stream: No such file or directory in /var/www/git/apache-camel-users/msg03570.html on line 85
Call Stack
#TimeMemoryFunctionLocation
10.0006363032{main}( ).../msg03570.html:0

( ! ) Warning: include(): Failed opening 'msgfooter.php' for inclusion (include_path='.:/var/www/git') in /var/www/git/apache-camel-users/msg03570.html on line 85
Call Stack
#TimeMemoryFunctionLocation
10.0006363032{main}( ).../msg03570.html:0