From f99a6e0203372eebb8e2854459bf295bb66bd236 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Sun, 1 Dec 2024 16:53:34 +0530 Subject: [PATCH 01/10] Fix build --- ksqldb-common/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/ksqldb-common/pom.xml b/ksqldb-common/pom.xml index c2d9021b072e..542041213e8b 100644 --- a/ksqldb-common/pom.xml +++ b/ksqldb-common/pom.xml @@ -29,6 +29,12 @@ + + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.3 + + com.google.code.findbugs jsr305 From c0225251766688825060cdb248939321f3299e11 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Sun, 1 Dec 2024 17:24:31 +0530 Subject: [PATCH 02/10] Use DatatypeConverter from jakarta --- ksqldb-common/pom.xml | 2 +- .../src/main/java/io/confluent/ksql/util/BytesUtils.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ksqldb-common/pom.xml b/ksqldb-common/pom.xml index 542041213e8b..57ff60ca6584 100644 --- a/ksqldb-common/pom.xml +++ b/ksqldb-common/pom.xml @@ -32,7 +32,7 @@ jakarta.xml.bind jakarta.xml.bind-api - 2.3.3 + 4.0.2 diff --git a/ksqldb-common/src/main/java/io/confluent/ksql/util/BytesUtils.java b/ksqldb-common/src/main/java/io/confluent/ksql/util/BytesUtils.java index 60b96bede49c..25b6bc0f2907 100644 --- a/ksqldb-common/src/main/java/io/confluent/ksql/util/BytesUtils.java +++ b/ksqldb-common/src/main/java/io/confluent/ksql/util/BytesUtils.java @@ -16,6 +16,7 @@ import com.google.common.collect.ImmutableMap; import io.vertx.core.buffer.Buffer; +import jakarta.xml.bind.DatatypeConverter; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.charset.StandardCharsets; @@ -25,7 +26,6 @@ import java.util.List; import java.util.Map; import java.util.function.Function; -import javax.xml.bind.DatatypeConverter; public final class BytesUtils { public enum Encoding { From af7e46d566069baca942b0551c340285753b87b7 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Fri, 6 Dec 2024 16:17:14 +0530 Subject: [PATCH 03/10] Use assertEquals instead --- .../ksql/serde/avro/KsqlAvroDeserializerTest.java | 5 ++--- .../confluent/ksql/serde/avro/KsqlAvroSerializerTest.java | 7 +++---- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java index 6e4c4417fa4b..f4c72788432f 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java @@ -23,8 +23,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.assertThrows; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage; import com.google.common.collect.ImmutableList; @@ -891,7 +890,7 @@ public void shouldCoerceArrayElements() { final Object result = deserializer.deserialize(SOME_TOPIC, bytes); // Then: - assertThat(result, is(expected)); + assertEquals(is(expected), result); }); } diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java index a76b73efe0a3..f56cc5f3ab63 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java @@ -33,8 +33,7 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.assertThrows; -import static org.junit.Assert.fail; +import static org.junit.Assert.*; import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage; import com.google.common.collect.ImmutableList; @@ -772,7 +771,7 @@ public void shouldSerializeArrayOfStruct() { final byte[] bytes = serializer.serialize(SOME_TOPIC, value); // Then: - assertThat(deserialize(bytes), is((List) ImmutableList.of(avroOrder))); + assertEquals(ImmutableList.of(avroOrder), deserialize(bytes)); } @Test @@ -989,7 +988,7 @@ public void shouldSerializeMapOfStruct() { ); final GenericArray actual = deserialize(bytes); - assertThat(actual, is(expected)); + assertEquals(is(expected), actual); } @Test From 636cc89d93231119d9d0a384df1a8a5fc72e59bc Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Fri, 6 Dec 2024 16:45:16 +0530 Subject: [PATCH 04/10] Fix assert statement --- .../io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java | 2 +- .../io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java index f4c72788432f..e453282d31f5 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java @@ -890,7 +890,7 @@ public void shouldCoerceArrayElements() { final Object result = deserializer.deserialize(SOME_TOPIC, bytes); // Then: - assertEquals(is(expected), result); + assertEquals(expected, is(result)); }); } diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java index f56cc5f3ab63..2388c8669715 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java @@ -988,7 +988,7 @@ public void shouldSerializeMapOfStruct() { ); final GenericArray actual = deserialize(bytes); - assertEquals(is(expected), actual); + assertEquals(expected, is(actual)); } @Test From 17d0a2f2959aac6ccedc9b13b0a29267ccbd7653 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Fri, 6 Dec 2024 18:27:00 +0530 Subject: [PATCH 05/10] Fix asser equals --- .../io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java | 2 +- .../io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java index e453282d31f5..7393819f4050 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java @@ -890,7 +890,7 @@ public void shouldCoerceArrayElements() { final Object result = deserializer.deserialize(SOME_TOPIC, bytes); // Then: - assertEquals(expected, is(result)); + assertEquals(expected, result); }); } diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java index 2388c8669715..1274d914bd69 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java @@ -988,7 +988,7 @@ public void shouldSerializeMapOfStruct() { ); final GenericArray actual = deserialize(bytes); - assertEquals(expected, is(actual)); + assertEquals(expected, actual); } @Test From fea320ec4cad12673ce75f180f4a673282859ed9 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Mon, 9 Dec 2024 11:30:29 +0530 Subject: [PATCH 06/10] Fix tests --- .../io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java | 2 +- .../io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java index 7393819f4050..60bfb0abc2ca 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java @@ -890,7 +890,7 @@ public void shouldCoerceArrayElements() { final Object result = deserializer.deserialize(SOME_TOPIC, bytes); // Then: - assertEquals(expected, result); + assertEquals(result, expected); }); } diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java index 1274d914bd69..b17cb51ebe58 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java @@ -987,8 +987,7 @@ public void shouldSerializeMapOfStruct() { MAP_VALUE_ORDER_AVRO_SCHEMA ); - final GenericArray actual = deserialize(bytes); - assertEquals(expected, actual); + assertEquals(deserialize(bytes), expected); } @Test From 09f85d92a3c097236b020c83fb9069a59a5fb3c8 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Mon, 9 Dec 2024 13:53:19 +0530 Subject: [PATCH 07/10] Fixes a test --- .../io/confluent/ksql/internal/ThroughputMetricsReporter.java | 3 +-- .../confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java | 2 +- .../io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java | 4 ++-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ksqldb-engine/src/main/java/io/confluent/ksql/internal/ThroughputMetricsReporter.java b/ksqldb-engine/src/main/java/io/confluent/ksql/internal/ThroughputMetricsReporter.java index cf33233f88b5..cd586674307a 100644 --- a/ksqldb-engine/src/main/java/io/confluent/ksql/internal/ThroughputMetricsReporter.java +++ b/ksqldb-engine/src/main/java/io/confluent/ksql/internal/ThroughputMetricsReporter.java @@ -21,7 +21,6 @@ import static io.confluent.ksql.internal.MetricsTagUtils.SHARED_RUNTIME_THREAD_PATTERN; import static io.confluent.ksql.internal.MetricsTagUtils.UNSHARED_RUNTIME_THREAD_PATTERN; import static java.util.Objects.requireNonNull; -import static org.apache.kafka.common.utils.Utils.mkSet; import com.google.common.annotations.VisibleForTesting; import com.google.common.collect.ImmutableMap; @@ -52,7 +51,7 @@ public class ThroughputMetricsReporter implements MetricsReporter { private static final String RECORDS_PRODUCED = "records-produced-total"; private static final String BYTES_PRODUCED = "bytes-produced-total"; private static final Set THROUGHPUT_METRIC_NAMES = - mkSet(RECORDS_CONSUMED, BYTES_CONSUMED, RECORDS_PRODUCED, BYTES_PRODUCED); + Set.of(RECORDS_CONSUMED, BYTES_CONSUMED, RECORDS_PRODUCED, BYTES_PRODUCED); private static final Map>> metrics = new HashMap<>(); diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java index 60bfb0abc2ca..ac8ba32ccd28 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java @@ -890,7 +890,7 @@ public void shouldCoerceArrayElements() { final Object result = deserializer.deserialize(SOME_TOPIC, bytes); // Then: - assertEquals(result, expected); + assertThat(result, is(expected)); }); } diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java index b17cb51ebe58..14c41c5bb1a1 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java @@ -986,8 +986,8 @@ public void shouldSerializeMapOfStruct() { ImmutableMap.of(new Utf8("k"), avroOrder), MAP_VALUE_ORDER_AVRO_SCHEMA ); - - assertEquals(deserialize(bytes), expected); + final GenericArray actual = deserialize(bytes); + assertEquals(expected.toArray(), actual.toArray()); } @Test From b849da12d17573aed4191107e907a27355303447 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Wed, 11 Dec 2024 10:42:10 +0530 Subject: [PATCH 08/10] Revert test updates --- .../confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java | 2 -- .../io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java index ac8ba32ccd28..b44a6edcddce 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java @@ -38,7 +38,6 @@ import io.confluent.ksql.util.DecimalUtil; import io.confluent.ksql.util.KsqlConfig; import io.confluent.ksql.util.KsqlException; -import io.confluent.ksql.util.KsqlPreconditions; import java.math.BigDecimal; import java.nio.ByteBuffer; import java.time.LocalDate; @@ -52,7 +51,6 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; -import java.util.Optional; import java.util.stream.Collectors; import org.apache.avro.Conversions.DecimalConversion; import org.apache.avro.LogicalTypes; diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java index 14c41c5bb1a1..409c5f53f197 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java @@ -771,7 +771,7 @@ public void shouldSerializeArrayOfStruct() { final byte[] bytes = serializer.serialize(SOME_TOPIC, value); // Then: - assertEquals(ImmutableList.of(avroOrder), deserialize(bytes)); + assertThat(deserialize(bytes), is((List) ImmutableList.of(avroOrder))); } @Test @@ -987,7 +987,7 @@ public void shouldSerializeMapOfStruct() { MAP_VALUE_ORDER_AVRO_SCHEMA ); final GenericArray actual = deserialize(bytes); - assertEquals(expected.toArray(), actual.toArray()); + assertThat(actual, is(expected)); } @Test From 30171be49bcbac4de4170c639d8f24440fa396e7 Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Wed, 11 Dec 2024 12:56:54 +0530 Subject: [PATCH 09/10] Use set default for KafkaMetric --- .../confluent/ksql/services/SandboxedAdminClientTest.java | 8 ++++++++ .../io/confluent/ksql/services/SandboxedConsumerTest.java | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedAdminClientTest.java b/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedAdminClientTest.java index 656859b9f69d..8e7c3431808a 100644 --- a/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedAdminClientTest.java +++ b/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedAdminClientTest.java @@ -24,6 +24,8 @@ import java.util.concurrent.TimeUnit; import org.apache.kafka.clients.admin.Admin; import org.apache.kafka.clients.admin.ElectLeadersOptions; +import org.apache.kafka.common.metrics.KafkaMetric; +import org.apache.kafka.common.metrics.Measurable; import org.junit.Before; import org.junit.Test; import org.junit.experimental.runners.Enclosed; @@ -47,6 +49,12 @@ public static Collection> getMethodsToTest() { .ignoreUnchecked("close", long.class, TimeUnit.class) .setDefault(ElectLeadersOptions.class, new ElectLeadersOptions()) .setDefault(Optional.class, Optional.empty()) + .setDefault(KafkaMetric.class, new KafkaMetric( + null, + null, + (Measurable) (config, now) -> 0, + null, + null)) .build(); } diff --git a/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedConsumerTest.java b/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedConsumerTest.java index 285519669df1..111a91d6ef50 100644 --- a/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedConsumerTest.java +++ b/ksqldb-engine/src/test/java/io/confluent/ksql/services/SandboxedConsumerTest.java @@ -23,6 +23,8 @@ import java.util.concurrent.TimeUnit; import org.apache.kafka.clients.consumer.Consumer; import org.apache.kafka.common.TopicPartition; +import org.apache.kafka.common.metrics.KafkaMetric; +import org.apache.kafka.common.metrics.Measurable; import org.junit.Before; import org.junit.Test; import org.junit.experimental.runners.Enclosed; @@ -48,6 +50,12 @@ public static Collection> getMethodsToTest() { .ignore("wakeup") .ignore("groupMetadata") .setDefault(TopicPartition.class, new TopicPartition("t", 1)) + .setDefault(KafkaMetric.class, new KafkaMetric( + null, + null, + (Measurable) (config, now) -> 0, + null, + null)) .build(); } From 80dee8f6abf15f6f3b717554e8e3a7d3bf1b7fca Mon Sep 17 00:00:00 2001 From: Vedarth Sharma Date: Fri, 13 Dec 2024 11:21:30 +0530 Subject: [PATCH 10/10] Encode the test url --- .../ksql/rest/integration/RestIntegrationTestUtil.java | 5 +++-- .../confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java | 3 ++- .../io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/integration/RestIntegrationTestUtil.java b/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/integration/RestIntegrationTestUtil.java index 4b2d518dac6c..5cb7130b27e2 100644 --- a/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/integration/RestIntegrationTestUtil.java +++ b/ksqldb-rest-app/src/test/java/io/confluent/ksql/rest/integration/RestIntegrationTestUtil.java @@ -65,6 +65,7 @@ import io.vertx.ext.web.client.WebClientOptions; import io.vertx.ext.web.codec.BodyCodec; import java.net.URI; +import java.net.URLEncoder; import java.nio.charset.StandardCharsets; import java.util.ArrayList; import java.util.Base64; @@ -567,9 +568,9 @@ public static List makeWsRequest( try { httpClient = vertx.createHttpClient(); - final String uri = baseUri.toString() + "/ws/query?request=" + final String uri = URLEncoder.encode(baseUri.toString() + "/ws/query?request=" + buildStreamingRequest(sql, overrides, requestProperties) - + "&access_token=" + credentials.get().getAuthHeader(); + + "&access_token=" + credentials.get().getAuthHeader(), StandardCharsets.UTF_8); final MultiMap headers = MultiMap.caseInsensitiveMultiMap(); diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java index b44a6edcddce..9c0b82233c1c 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroDeserializerTest.java @@ -23,7 +23,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.*; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.fail; import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage; import com.google.common.collect.ImmutableList; diff --git a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java index 409c5f53f197..a76b73efe0a3 100644 --- a/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java +++ b/ksqldb-serde/src/test/java/io/confluent/ksql/serde/avro/KsqlAvroSerializerTest.java @@ -33,7 +33,8 @@ import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.nullValue; -import static org.junit.Assert.*; +import static org.junit.Assert.assertThrows; +import static org.junit.Assert.fail; import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage; import com.google.common.collect.ImmutableList; @@ -986,6 +987,7 @@ public void shouldSerializeMapOfStruct() { ImmutableMap.of(new Utf8("k"), avroOrder), MAP_VALUE_ORDER_AVRO_SCHEMA ); + final GenericArray actual = deserialize(bytes); assertThat(actual, is(expected)); }