Maven plugin test-update goal is not working
See original GitHub issueTesting running a non-compatible schema with “test-update” does not fail the maven build.
It seems nothing special is done when the result map is populated with failed entries: https://github.com/Apicurio/apicurio-registry/blob/master/utils/maven-plugin/src/main/java/io/apicurio/registry/maven/TestUpdateRegistryMojo.java#L65
Tested schemas was uploading this: https://github.com/confluentinc/examples/blob/6.1.0-post/clients/avro/src/main/resources/avro/io/confluent/examples/clients/basicavro/Payment2a.avsc
Where this was the existing schema: https://github.com/confluentinc/examples/blob/6.1.0-post/clients/avro/src/main/resources/avro/io/confluent/examples/clients/basicavro/Payment.avsc
Only on non “bad requests” (errors) does it fail the build: https://github.com/Apicurio/apicurio-registry/blob/master/utils/maven-plugin/src/main/java/io/apicurio/registry/maven/TestUpdateRegistryMojo.java#L83
Probably there needs to be some check for the invalid entries:
List<Map.Entry<String, Boolean>> invalidArtifacts =
results.entrySet().stream().filter(e -> Boolean.FALSE.equals(e.getValue()))
.collect(Collectors.toList());
if(!invalidArtifacts.isEmpty()) { throw ...}
Issue Analytics
- State:
- Created 3 years ago
- Comments:11 (7 by maintainers)
Top GitHub Comments
I can probably take a stab at it.
I tried to replicate locally with latest master, but couldn’t. So somethings going on, hopefully it was not a silly mistake on my part with my first test. I will try to replicate that scenario again and post more details.
I also experienced another issue with Confluent Json Schema serializers. Hopefully I can contribute a replicating test case for that and file another ticket.
Marking this as fixed in 2.0 (we think it is). If this is still a problem, please re-open this issue!