This is an automated email from the ASF dual-hosted git repository.
apupier pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 185adf9fbbf5 CAMEL-23734 - adapt VertxHttpTransferExceptionTest
185adf9fbbf5 is described below
commit 185adf9fbbf5ab927eacaf262af09389bceb084a
Author: Aurélien Pupier <[email protected]>
AuthorDate: Thu Jun 11 11:27:57 2026 +0200
CAMEL-23734 - adapt VertxHttpTransferExceptionTest
to behavior change and default values for muteException
https://github.com/apache/camel/pull/23913
Signed-off-by: Aurélien Pupier <[email protected]>
---
components/camel-vertx/camel-vertx-http/pom.xml | 5 +++++
.../component/vertx/http/VertxHttpTransferExceptionTest.java | 11 +++++------
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/components/camel-vertx/camel-vertx-http/pom.xml
b/components/camel-vertx/camel-vertx-http/pom.xml
index 55784b035275..45069b2b970e 100644
--- a/components/camel-vertx/camel-vertx-http/pom.xml
+++ b/components/camel-vertx/camel-vertx-http/pom.xml
@@ -65,5 +65,10 @@
<artifactId>camel-undertow</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.assertj</groupId>
+ <artifactId>assertj-core</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
</project>
diff --git
a/components/camel-vertx/camel-vertx-http/src/test/java/org/apache/camel/component/vertx/http/VertxHttpTransferExceptionTest.java
b/components/camel-vertx/camel-vertx-http/src/test/java/org/apache/camel/component/vertx/http/VertxHttpTransferExceptionTest.java
index 4f839ca939b1..b90189a75c0f 100644
---
a/components/camel-vertx/camel-vertx-http/src/test/java/org/apache/camel/component/vertx/http/VertxHttpTransferExceptionTest.java
+++
b/components/camel-vertx/camel-vertx-http/src/test/java/org/apache/camel/component/vertx/http/VertxHttpTransferExceptionTest.java
@@ -19,10 +19,9 @@ package org.apache.camel.component.vertx.http;
import org.apache.camel.Exchange;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.RouteBuilder;
+import org.assertj.core.api.Assertions;
import org.junit.jupiter.api.Test;
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class VertxHttpTransferExceptionTest extends VertxHttpTestSupport {
@@ -33,9 +32,9 @@ public class VertxHttpTransferExceptionTest extends
VertxHttpTestSupport {
assertTrue(exchange.isFailed());
Exception exception = exchange.getException();
- assertNotNull(exception);
- assertTrue(exception instanceof IllegalStateException);
- assertEquals("Forced Exception", exception.getMessage());
+ Assertions.assertThat(exception)
+ .isInstanceOf(IllegalStateException.class)
+ .hasMessage("Forced Exception");
}
@Override
@@ -43,7 +42,7 @@ public class VertxHttpTransferExceptionTest extends
VertxHttpTestSupport {
return new RouteBuilder() {
@Override
public void configure() {
- from(getTestServerUri() + "?transferException=true")
+ from(getTestServerUri() +
"?transferException=true&muteException=false")
.throwException(new IllegalStateException("Forced
Exception"));
}
};