yashmayya commented on code in PR #14003:
URL: https://github.com/apache/kafka/pull/14003#discussion_r1263265359


##########
connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerTest.java:
##########
@@ -2015,6 +2019,33 @@ public void testAlterOffsetsSourceConnectorError() 
throws Exception {
         verifyKafkaClusterId();
     }
 
+    @Test
+    public void testNormalizeSourceConnectorOffsets() throws Exception {
+        Map<Map<String, ?>, Map<String, ?>> offsets = Collections.singletonMap(
+                Collections.singletonMap("filename", "/path/to/filename"),
+                Collections.singletonMap("position", 20)
+        );
+
+        assertTrue(offsets.values().iterator().next().get("position") 
instanceof Integer);
+
+        JsonConverter jsonConverter = new JsonConverter();
+        
jsonConverter.configure(Collections.singletonMap(SCHEMAS_ENABLE_CONFIG, false), 
false);
+        when(plugins.newInternalConverter(eq(true), anyString(), anyMap()))
+                .thenReturn(jsonConverter);
+        when(plugins.newInternalConverter(eq(false), anyString(), anyMap()))
+                .thenReturn(jsonConverter);

Review Comment:
   Ah yeah, this is left over from before I modified the 
`mockInternalConverters` method in order for the other tests to pass.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to