dengziming commented on a change in pull request #11471:
URL: https://github.com/apache/kafka/pull/11471#discussion_r828724247



##########
File path: 
connect/file/src/test/java/org/apache/kafka/connect/file/FileStreamSourceTaskTest.java
##########
@@ -220,17 +224,22 @@ public void testMissingFile() throws InterruptedException 
{
         task.stop();
     }
 
+    @Test
     public void testInvalidFile() throws InterruptedException {
         config.put(FileStreamSourceConnector.FILE_CONFIG, "bogusfilename");
         task.start(config);
         // Currently the task retries indefinitely if the file isn't found, 
but shouldn't return any data.
-        for (int i = 0; i < 100; i++)
+        for (int i = 0; i < 3; i++)
             assertNull(task.poll());
     }
 
-
     private void expectOffsetLookupReturnNone() {
-        
EasyMock.expect(context.offsetStorageReader()).andReturn(offsetStorageReader);
-        EasyMock.expect(offsetStorageReader.offset(EasyMock.<Map<String, 
String>>anyObject())).andReturn(null);
+        when(context.offsetStorageReader()).thenReturn(offsetStorageReader);
+        when(offsetStorageReader.offset(anyMap())).thenReturn(null);
+    }
+
+    private void verifyAll() {

Review comment:
       On I forgot about this, I removed the extra call after each method.




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