Skip to content

Commit bd260f1

Browse files
MartijnVissertzulitai
authored andcommitted
[FLINK-33191][Connector/Kafka] Make the testKafkaValueDeserializationSchemaWrapper test use flink-shaded-jackson since it tests flink-shaded-jackson ObjectNodes.
Co-authored-by: zentol <[email protected]> This closes #57.
1 parent e9d3089 commit bd260f1

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/source/reader/deserializer/KafkaRecordDeserializationSchemaTest.java

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,16 +81,24 @@ public void testKafkaDeserializationSchemaWrapper() throws Exception {
8181
@Test
8282
public void testKafkaValueDeserializationSchemaWrapper() throws Exception {
8383
final ConsumerRecord<byte[], byte[]> consumerRecord = getConsumerRecord();
84-
KafkaRecordDeserializationSchema<ObjectNode> schema =
85-
KafkaRecordDeserializationSchema.valueOnly(
86-
new JsonDeserializationSchema<>(ObjectNode.class));
84+
KafkaRecordDeserializationSchema<
85+
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node
86+
.ObjectNode>
87+
schema =
88+
KafkaRecordDeserializationSchema.valueOnly(
89+
new JsonDeserializationSchema<>(
90+
org.apache.flink.shaded.jackson2.com.fasterxml.jackson
91+
.databind.node.ObjectNode.class));
8792
schema.open(new DummyInitializationContext());
88-
SimpleCollector<ObjectNode> collector = new SimpleCollector<>();
93+
SimpleCollector<
94+
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node
95+
.ObjectNode>
96+
collector = new SimpleCollector<>();
8997
schema.deserialize(consumerRecord, collector);
9098

9199
assertThat(collector.list).hasSize(1);
92-
ObjectNode deserializedValue = collector.list.get(0);
93-
100+
org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.node.ObjectNode
101+
deserializedValue = collector.list.get(0);
94102
assertThat(deserializedValue.get("word").asText()).isEqualTo("world");
95103
assertThat(deserializedValue.get("key")).isNull();
96104
assertThat(deserializedValue.get("metadata")).isNull();

0 commit comments

Comments
 (0)