My RouteBuilder classes have parametrised constructors, there is no default
constructor. If I understand correctly, with CamelTestSupport I have to get
away without all the Spring magic. I will keep this in mind in case I will
reach dead end with the other solution.
Kind regards, Jan
> -Or
Hi,
It's not clear to me how should I write my test class when need more than one
test method. Where should I place the AdviceWith.adviceWith() method call? See
my test class bellow. Obviously if fails in testRoute2() because second call to
BeforeEach will fail, endpoint not found, because it i
Thanks for pointing me to the right direction. I modified my test class, the
other routers are constructed but not started:
@SpringBootTest(classes = Application.class,
properties =
{"camel.main.java-routes-include-pattern=**/RouteXYBuilder"}
)
Jan
> -Original Message-
> From:
Hello Fabien,
thanks for the analysis, I did some investigation, and this PR addresses
the opening of the extra thread
https://github.com/apache/camel-spring-boot/pull/1354, I am still using
Spring ThreadPoolTaskExecutor, we wanted to achieve a similar behavior
as @Async, we didn't want to have a
If you want to test a route(s) in isolation then, yes, you can avoid the Spring
tricks and create the config yourself. Or load it in something like
@TestProperty. For creating the route classes I do something like this:
public class SteveRouteTest extends CamelTestSupport {
@Override
pr
Hi
Try the @ExcludeRoutes annotation
On Mon, Jan 27, 2025 at 3:20 PM Jan Bares, WOOD & Co.
wrote:
> Hi,
>
> I need some help or at least pointer to samples on how to write JUnit
> tests for Camel 4.6 Spring Boot application. I don't know how to test
> single route in isolation without starting
Thank you. But without @SpringBootTest how should I code my
createRouteBuilder() method? I need to reuse my RouteXYBuilder class. This
class is created by Spring DI. Or do I have to create all the configuration
beans manually without Spring?
Thanks, Jan
> -Original Message-
> From: Ste
Hi Jan,
At a high level, take away the @CamelSpringBootTest and @SpringBootTest; those
are what is causing the whole test context and route set to load and start.
Change your RouteXYTest class to extend from CamelTestSupport
https://camel.apache.org/components/4.8.x/others/test-junit5.html
-St
Hi,
I need some help or at least pointer to samples on how to write JUnit tests for
Camel 4.6 Spring Boot application. I don't know how to test single route in
isolation without starting all the other (autostarted) routes.
Our application has many routes that look like this
@Configuration
@Com