Questions tagged [camel-test]

35 questions
6
votes
3 answers

Spring Boot Camel Testing

I need to test Camel routes in a Spring Boot Application. I've the Spring boot main class with all the necessary beans declared in it. I am using the CamelSpringJUnit4ClassRunner.class. Added my Spring boot main class in @ContextConfiguration as it…
Mittal
  • 105
  • 3
  • 12
3
votes
2 answers

Camel Testing - How to test a Processor from a FileConsumer/FTPConsumer?

I have a camel route which polls the files from a ftp server and send files to s3. I have some processors in the route which calculates/manipulates the headers based on file name. I need to test this route, How can i inject my processor and use the…
Gangaraju
  • 4,406
  • 9
  • 45
  • 77
2
votes
1 answer

Failure running Spring-Boot + Camel tests in batch

For my Kotlin application with Spring-Boot 2.7.0 and Apache Camel 3.17.0, I am running into a rather surprising issue: I have a set of JUnit 5 test cases that individually run fine (using mvn test -DTest="MyTest"); but when run in batch via mvn test…
Ulrich Schuster
  • 1,670
  • 15
  • 24
2
votes
2 answers

Apache Camel - DirectConsumerNotAvailableException: No consumers available on endpoint. Exchange[]

Someone that can help my with this error and explain me what is wrong? I'm developing a simple camel route to process an information and then store it in a file. Technologies that I'm using: JDK 11 Apache Camel 3.3.0 Spring-boot 2.3.0 When I…
César
  • 31
  • 1
  • 10
2
votes
0 answers

Camel route testing with mock endpoint

Camel route testing with Springboot, Activemq & mock endpoint I've a Camel route which reads form activemq & passes to processor which does further processing & business logic. I'm trying to test by producing & sending message by ProducerTemplate,…
1
vote
1 answer

Unit testing camel routes using camel test support

I would like to right unit and integration test cases to test all the functional flow. Can someone share your thoughts on how I can create a mock endpoint to watch directory for file creation and further process them via multiple routes and move the…
1
vote
0 answers

Test case for Camel Springboot application takes a longer build time

I have written camel test case for my spring boot application as below. @RunWith(CamelSpringRunner.class) @SpringBootTest @ActiveProfiles("test") @ContextConfiguration(classes = Application.class) @DirtiesContext(classMode =…
Robin
  • 109
  • 9
1
vote
1 answer

Unable to create MockEndpoint for camel-timer

I am using Camel Timer component to read blobs from Azure storage container. A route is created which will poll for blobs every 10secs and is processed by the CloudBlobProcessor. from("timer://testRoute?fixedRate=true&period=10s") …
srikant_mantha
  • 109
  • 1
  • 13
1
vote
1 answer

Testing from-Endpoints with CamelBlueprintTestSupport fails with some components

I'd like to test Camel Routes implemented with Blueprint-XML. When trying to test a route with a simple "direct"-from endpoint, everything works fine. But changing the "from" endpoint to the netty or jetty component, the test fails with the…
1
vote
1 answer

NPE during camel route test

I am trying to test camel route, and below are the annotations on my test class. @RunWith(CamelSpringBootRunner.class) @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT) @DirtiesContext(classMode =…
Jigar Naik
  • 1,946
  • 5
  • 29
  • 60
1
vote
1 answer

Writing unit tests for camel routes in a SpringBoot application - getting messageCount 0

I am trying to write unit tests for a camel route - its for importing and processing a file from(fullImportFTP) .routeId(STUB_FILE_DOWNLOAD_ROUTE_ID) .onException(Exception.class) .handled(false) …
ljs
  • 495
  • 1
  • 8
  • 23
1
vote
1 answer

Camel Spring Boot CXF endpoint testing

I have following endpoints and route. @Bean public CxfEndpoint requestEndpoint() { CxfEndpoint endpoint = new CxfEndpoint(); endpoint.setAddress(SERVICE_ADDRESS); endpoint.setServiceClass(Service.class); …
Wi-Al
  • 225
  • 1
  • 13
1
vote
2 answers

CamelTestSupport read placeholders from yml file

I am trying to test my Camel Routes using CamelTestSupport. I have my routes defined in a class like this public class ActiveMqConfig{ @Bean public RoutesBuilder route() { return new SpringRouteBuilder() { @Override public…
pvpkiran
  • 25,582
  • 8
  • 87
  • 134
1
vote
4 answers

Spring Boot Apache Camel Routes testing

I have a Springboot application, where I have some Camel routes configured. public class CamelConfig { private static final Logger LOG = LoggerFactory.getLogger(CamelConfig.class); @Value("${activemq.broker.url:tcp://localhost:61616}") …
pvpkiran
  • 25,582
  • 8
  • 87
  • 134
1
vote
1 answer

Loading properties file while running camel blueprint test

I am using property-placeholder tag to load a properties as follows: While deploying my project on JBOSS Fuse, it will load camel.blueprint.cfg from /etc/ directory of…
niyasc
  • 4,440
  • 1
  • 23
  • 50
1
2 3