mcarlett opened a new pull request, #1677: URL: https://github.com/apache/camel-spring-boot/pull/1677
Refactors completely the integration tests moving from arquillian to junit, instead of creating the application to test at runtime using shrinkwrap, it uses the maven archetype. Following a part of the included readme file, to overview the steps of each test . **Archetype generation** -- The `ArchetypeGenerationExtension` JUnit 6 extension generates a minimal Spring Boot project from `camel-archetype-spring-boot`. The generated project is then customized: test-scoped dependencies and the demo `camel-stream-starter` are removed, the starter under test is added, and any extra dependencies or `application.properties` entries from the test config are applied. . **Compilation** -- The generated project is compiled via `mvn compile dependency:build-classpath`, which also writes the full runtime classpath to a file for the next step. . **Classloader isolation** -- A child `URLClassLoader` is created with the compiled classes and all resolved dependency JARs, parented by the test classloader. Only `camel-api` and `spring-context` live on the parent classloader so that assertion types (`CamelContext`, `Component`, `DataFormat`, `Language`, `CamelClusterService`) are shared. . **Spring Boot startup** -- `SpringApplication` is loaded from the child classloader and started via reflection. A `DefaultResourceLoader` pointing at the child classloader ensures the generated project's `application.properties` is picked up. By default, the embedded web server is disabled (`spring.main.web-application-type=none`). When `webRequired` is set to `true`, the web stack is kept and the server binds to a random port (`server.port=0`) to avoid conflicts during parallel execution. -- 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]
