From 1ef49c92cea0192a1a419c4bbbde9f8b45c32f63 Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Fri, 13 Nov 2026 09:34:37 +0100 Subject: [PATCH] CAMEL-26012: camel-yaml-dsl-validator - TextBodyFlowTest no longer expects a pulsar finding Since #29753 the pulsar producer body depends on allowJavaSerializedObject, an option that may also be set on the component. The validator then does not know the body a route sends to pulsar, and says nothing, as it does for spring-rabbitmq. The test still expected the "to: pulsar needs the body as text" finding, and failed on every PR whose build runs camel-yaml-dsl-validator. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claus Ibsen --- .../camel/dsl/yaml/validator/TextBodyFlowTest.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/TextBodyFlowTest.java b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/TextBodyFlowTest.java index 966039254eb0d..2863745362370 100644 --- a/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/TextBodyFlowTest.java +++ b/dsl/camel-yaml-dsl/camel-yaml-dsl-validator/src/test/java/org/apache/camel/dsl/yaml/validator/TextBodyFlowTest.java @@ -1430,10 +1430,10 @@ public void testTheBodyOfCloudMessaging() { @Test public void testTheBodyOfMessaging() { - // the paho consumer gives bytes, so a field read needs an unmarshal; pulsar and smtp send what converts to - // bytes or text, so parsed data must be marshalled first, and so must the reply of a nats consumer that answers - // (InOut); the converter of spring-rabbitmq may be set on the component, and an imap mail may be text, a stream - // or a multipart, which say nothing + // the paho consumer gives bytes, so a field read needs an unmarshal; smtp sends what converts to text, so + // parsed data must be marshalled first, and so must the reply of a nats consumer that answers (InOut); the + // converter of spring-rabbitmq and the allowJavaSerializedObject option of pulsar may be set on the component, + // and an imap mail may be text, a stream or a multipart, which say nothing String yaml = """ - route: id: mqtt @@ -1502,10 +1502,10 @@ public void testTheBodyOfMessaging() { name: id simple: ${body[id]} """; - assertThat(lines(yaml)).hasSize(4).anySatisfy(m -> assertThat(m) + assertThat(lines(yaml)).hasSize(3).anySatisfy(m -> assertThat(m) .contains("route mqtt: simple reads a field of the body (${body[id]})") .contains("the paho consumer gives it as bytes")) - .anySatisfy(m -> assertThat(m).contains("to: pulsar needs the body as text, bytes, a stream or a file")) + .noneSatisfy(m -> assertThat(m).contains("route publish:")) .anySatisfy(m -> assertThat(m) .contains("route service:") .contains("the body at the end of the route is the reply to the nats request"))