I am new to Apache Camel and learn from coding.
My simple router is
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd ">
<camelContext id="camelContext" xmlns="http://camel.apache.org/schema/spring">
<route>
<from uri="timer:timer?repeatCount=1"/>
<to uri="https://v2.jokeapi.dev/joke/Any"/>
<log message="${body}"/>
</route>
</camelContext>
</beans>
and the test for this router is
@CamelSpringBootTest
public class JokeIT {
@Autowired
CamelContext camelContext;
@Test
void test_positive() throws InterruptedException {
NotifyBuilder notification = new NotifyBuilder(camelContext)
.from("timer:timer?repeatCount=1").whenDone(1)
.create();
camelContext.start();
notification.matches(10, TimeUnit.SECONDS) ;
camelContext.stop();
}
}
Test passed and prints response body as expected.
But what is strange that it passed even with
<to uri="https://v2.jokeapi.dev/joke/Any?proxyAuthHost=abcd"/>
How it can be? Or I missed something?
I expect the test should fail with unavailable proxy.
Thank you in advance.
I tried set proxyHost in query string with the same result.