During the execution of unit test, applicationrunner was started unexpectedly, resulting in the initialization of netty server and the failure of unit test execution.
Solution: by setting the profile of bean corresponding to applicationrunner
Add notes to corresponding components:
@Profile(“! test”)
Add notes to unit tests:
@ActiveProfiles(“test”)
Read More:
- Maven skip unit test
- [Solved] Unit test automatically injects error reporting nullpointer
- Junit4 unit test reports an error invalid project specified
- Maven skip unit test- maven.test.skip And skipstests
- The usage of Java JUnit unit test and the solution of initialization error
- Error in idea unit test command line is too long
- Spring configuration transaction, JUnit unit test error “failed to load ApplicationContext”
- Solve the problem that springboot does not scan @ repository
- Multithreading: when doing unit test, use thread pool to find that the specified code is not running and skip directly
- error starting container: API error (404): network fabric_test not found“
- [unity] when using unity hub, there is a problem of “failed to delete old unit installation file…” problem
- Solve the problem of starting nginx nginx.pid error
- Self test error when springboot accesses es and starts
- How to solve the problem of artifact contains illegal characters when creating springboot project with idea
- The springboot test class reported an error NullPointerException
- Solve rstudio software error: fatal error error system error 5 (access denied) problem, pro test effective
- Solve the problem that the delete request is not available under SpringBoot. There was an unexpected error (type=Method Not Allowed, status=405).
- Springboot startup error: error starting ApplicationContext
- import org.junit.Test And @ test error reporting — solutions
- Solution to the problem of spring boot running test class error creating bean with name ‘serverendpoint exporter’ defined