chia7712 commented on code in PR #16328:
URL: https://github.com/apache/kafka/pull/16328#discussion_r1639258794


##########
connect/runtime/src/test/java/org/apache/kafka/connect/util/SharedTopicAdminTest.java:
##########
@@ -46,14 +48,10 @@ public class SharedTopicAdminTest {
     @Mock private Function<Map<String, Object>, TopicAdmin> factory;
     private SharedTopicAdmin sharedAdmin;

Review Comment:
   we can move this to local variable, right?



##########
connect/runtime/src/test/java/org/apache/kafka/connect/storage/FileOffsetBackingStoreTest.java:
##########
@@ -123,12 +127,23 @@ public void testSaveRestore() throws Exception {
 
     @Test
     public void testThreadName() {
+        converter = mock(Converter.class);
+        store = new FileOffsetBackingStore(converter);
+        tempFile = assertDoesNotThrow(() -> 
File.createTempFile("fileoffsetbackingstore", null));
+        Map<String, String> props = new HashMap<>();
+        props.put(StandaloneConfig.OFFSET_STORAGE_FILE_FILENAME_CONFIG, 
tempFile.getAbsolutePath());
+        props.put(StandaloneConfig.KEY_CONVERTER_CLASS_CONFIG, 
"org.apache.kafka.connect.json.JsonConverter");
+        props.put(StandaloneConfig.VALUE_CONVERTER_CLASS_CONFIG, 
"org.apache.kafka.connect.json.JsonConverter");
+        config = new StandaloneConfig(props);
+        store.configure(config);
+        store.start();
         assertTrue(((ThreadPoolExecutor) store.executor).getThreadFactory()

Review Comment:
   Maybe we can move this `assert` to `setup` and then remove this test case. 
That is more simple to me



-- 
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