davsclaus commented on code in PR #30650:
URL: https://github.com/apache/camel/pull/30650#discussion_r4664091252


##########
components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaSchemaRegistryVendorClassesTest.java:
##########
@@ -38,7 +38,6 @@ class KafkaSchemaRegistryVendorClassesTest {
     static Stream<Arguments> vendorFormats() {
         return Stream.of(
                 Arguments.of("apicurio", "avro"),
-                Arguments.of("apicurio", "json"),
                 Arguments.of("apicurio", "protobuf"),

Review Comment:
   On this classpath (networknt 1.5.9) apicurio+json is not rejected, so this 
entry (and the one in `vendorsAndFormats()` of `KafkaSchemaRegistryVendorTest`) 
would still pass. Removing it leaves the happy path of apicurio+json untested; 
I suggest keeping both.



##########
components/camel-kafka/src/test/java/org/apache/camel/component/kafka/KafkaSchemaRegistryVendorTest.java:
##########
@@ -500,6 +496,26 @@ void azureSupportsOnlyAvro() {
         }
     }
 
+    @Test
+    void apicurioWithJsonFailsWhenJsonSchemaValidator3xIsOnTheClasspath() {
+        // The test classpath includes camel-kafka (via transitive deps) which 
pulls in json-schema-validator 3.x,

Review Comment:
   This comment is the other way round: the camel-kafka test classpath resolves 
`com.networknt:json-schema-validator` **1.5.9** (via 
`apicurio-registry-jsonschema-serde-kafka:3.3.4`, test scope), so 
`hasJsonSchemaValidator3x()` is false and the `assumeTrue` below always skips 
this test in CI. Same for the `if 
(KafkaSchemaRegistry.hasJsonSchemaValidator3x())` block in 
`producerFailsToStartForAnUnsupportedCombination`.
   
   Making the detection injectable (e.g. a package-private `vendor(String, 
String, boolean jsonSchemaValidator3x)`) would let this test both branches 
without depending on the classpath.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to