You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2023/10/10 11:17:35 UTC

[flink-connector-kafka] branch remove-shaded-jackson created (now ead6bc44)

This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a change to branch remove-shaded-jackson
in repository https://gitbox.apache.org/repos/asf/flink-connector-kafka.git


      at ead6bc44 make me pretty

This branch includes the following new commits:

     new e5426a8a fix jackson mismatch
     new ead6bc44 make me pretty

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[flink-connector-kafka] 01/02: fix jackson mismatch

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch remove-shaded-jackson
in repository https://gitbox.apache.org/repos/asf/flink-connector-kafka.git

commit e5426a8a5337882fa0f7524ba81d9bc8eae4ddd9
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Oct 10 13:06:41 2023 +0200

    fix jackson mismatch
---
 .../KafkaRecordDeserializationSchemaTest.java         | 19 ++++++++++++++-----
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java b/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java
index d61b7f83..a2a7a355 100644
--- a/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java
+++ b/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java
@@ -81,15 +81,24 @@ public class KafkaRecordDeserializationSchemaTest {
     @Test
     public void testKafkaValueDeserializationSchemaWrapper() throws Exception {
         final ConsumerRecord<byte[], byte[]> consumerRecord = getConsumerRecord();
-        KafkaRecordDeserializationSchema<ObjectNode> schema =
-                KafkaRecordDeserializationSchema.valueOnly(
-                        new JsonDeserializationSchema<>(ObjectNode.class));
+        KafkaRecordDeserializationSchema<
+                        org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node
+                                .ObjectNode>
+                schema =
+                        KafkaRecordDeserializationSchema.valueOnly(
+                                new JsonDeserializationSchema<>(
+                                        org.apache.flink.shaded.jackson2.com.fasterxml.jackson
+                                                .databind.node.ObjectNode.class));
         schema.open(new DummyInitializationContext());
-        SimpleCollector<ObjectNode> collector = new SimpleCollector<>();
+        SimpleCollector<
+                        org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node
+                                .ObjectNode>
+                collector = new SimpleCollector<>();
         schema.deserialize(consumerRecord, collector);
 
         assertThat(collector.list).hasSize(1);
-        ObjectNode deserializedValue = collector.list.get(0);
+        org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode
+                deserializedValue = collector.list.get(0);
 
         assertThat(deserializedValue.get("word").asText()).isEqualTo("world");
         assertThat(deserializedValue.get("key")).isNull();


[flink-connector-kafka] 02/02: make me pretty

Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

chesnay pushed a commit to branch remove-shaded-jackson
in repository https://gitbox.apache.org/repos/asf/flink-connector-kafka.git

commit ead6bc4494c8b4d0580e6f221e9bdee0b0d2a714
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Tue Oct 10 13:17:24 2023 +0200

    make me pretty
---
 .../KafkaRecordDeserializationSchemaTest.java             | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java b/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java
index a2a7a355..28560cf5 100644
--- a/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java
+++ b/flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java
@@ -96,13 +96,14 @@ public class KafkaRecordDeserializationSchemaTest {
                 collector = new SimpleCollector<>();
         schema.deserialize(consumerRecord, collector);
 
-        assertThat(collector.list).hasSize(1);
-        org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode
-                deserializedValue = collector.list.get(0);
-
-        assertThat(deserializedValue.get("word").asText()).isEqualTo("world");
-        assertThat(deserializedValue.get("key")).isNull();
-        assertThat(deserializedValue.get("metadata")).isNull();
+        assertThat(collector.list)
+                .hasSize(1)
+                .allSatisfy(
+                        deserializedValue -> {
+                            assertThat(deserializedValue.get("word").asText()).isEqualTo("world");
+                            assertThat(deserializedValue.get("key")).isNull();
+                            assertThat(deserializedValue.get("metadata")).isNull();
+                        });
     }
 
     @Test