diff --git a/kafka/src/main/java/io/specmesh/kafka/provision/schema/SchemaMutators.java b/kafka/src/main/java/io/specmesh/kafka/provision/schema/SchemaMutators.java index bb68ea6b..b2e648fb 100644 --- a/kafka/src/main/java/io/specmesh/kafka/provision/schema/SchemaMutators.java +++ b/kafka/src/main/java/io/specmesh/kafka/provision/schema/SchemaMutators.java @@ -37,7 +37,7 @@ /** Mutators for mutating Schemas */ public final class SchemaMutators { - public static final String DEFAULT_EVOLUTION = "FORWARD_TRANSITIVE"; + public static final String DEFAULT_EVOLUTION = "FULL_TRANSITIVE"; /** defensive */ private SchemaMutators() {} diff --git a/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java b/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java index 538ac3da..1dbbe9e9 100644 --- a/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java +++ b/kafka/src/test/java/io/specmesh/kafka/provision/SchemaProvisionerFunctionalTest.java @@ -27,7 +27,6 @@ import io.confluent.kafka.schemaregistry.ParsedSchema; import io.confluent.kafka.schemaregistry.avro.AvroSchema; import io.confluent.kafka.schemaregistry.client.SchemaRegistryClient; -import io.confluent.kafka.schemaregistry.client.rest.exceptions.RestClientException; import io.specmesh.kafka.DockerKafkaEnvironment; import io.specmesh.kafka.KafkaApiSpec; import io.specmesh.kafka.KafkaEnvironment; @@ -35,7 +34,6 @@ import io.specmesh.kafka.provision.schema.SchemaProvisioner; import io.specmesh.kafka.provision.schema.SchemaProvisioner.Schema; import io.specmesh.test.TestSpecLoader; -import java.io.IOException; import java.util.Collection; import java.util.List; import java.util.stream.Collectors; @@ -176,7 +174,7 @@ void shouldPublishUpdatedSchemas() throws Exception { @Test @Order(3) - void shouldRemoveUnspecdSchemas() throws RestClientException, IOException { + void shouldRemoveUnspecdSchemas() throws Exception { final var subject = "simple.provision_demo._public.NOT_user_signed_up-value"; final var schemaContent = @@ -204,7 +202,7 @@ void shouldRemoveUnspecdSchemas() throws RestClientException, IOException { testCleanUnSpecSchemas(); } - private void testCleanUnSpecSchemas() throws IOException, RestClientException { + private void testCleanUnSpecSchemas() throws Exception { final var cleanerSet2 = SchemaProvisioner.provision( false, true, API_UPDATE_SPEC, "./src/test/resources", srClient); @@ -221,7 +219,7 @@ private void testCleanUnSpecSchemas() throws IOException, RestClientException { "simple.provision_demo._protected.user_info-value")); } - private void testDryRun(final String subject) throws IOException, RestClientException { + private void testDryRun(final String subject) throws Exception { // test dry run final var cleanerSet = SchemaProvisioner.provision( diff --git a/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up-v2.avsc b/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up-v2.avsc index 1eee3a9c..5884e1c9 100644 --- a/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up-v2.avsc +++ b/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up-v2.avsc @@ -6,6 +6,7 @@ {"name": "fullName", "type": "string"}, {"name": "email", "type": "string"}, {"name": "address", "type": "string"}, - {"name": "age", "type": "int"} + {"name": "age", "type": "int"}, + {"name": "newThing", "type": [ "null", "string" ], "default": null} ] } \ No newline at end of file diff --git a/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up.avsc b/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up.avsc index 10b00e20..07b4fc06 100644 --- a/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up.avsc +++ b/kafka/src/test/resources/schema/simple.provision_demo._public.user_signed_up.avsc @@ -5,6 +5,8 @@ "fields": [ {"name": "fullName", "type": "string"}, {"name": "email", "type": "string"}, - {"name": "age", "type": "int"} + {"name": "address", "type": "string"}, + {"name": "age", "type": "int"}, + {"name": "oldThing", "type": [ "null", "string" ], "default": null} ] } \ No newline at end of file