pdolif opened a new issue, #13:
URL: https://github.com/apache/pulsar-connectors/issues/13

   The `FileListingThread` runs an infinite loop with a configurable polling 
interval for performing file listings. When an interval of 100ms is configured, 
I would expect that `performListing()` is invoked approximately every 100ms. 
However, it seems to run every 200ms only.
   
   ### Steps to reproduce
   
   Run the following test and add a log statement inside `FileListingThread` 
when `performListing()` is called.
   
   ```java
   @Test
   public void pollingIntervalTest() throws IOException {
       Map<String, Object> map = new HashMap<>();
       map.put("inputDirectory", directory.toString());
       map.put("pollingInterval", 100);
   
       try {
           listingThread = new FileListingThread(FileSourceConfig.load(map), 
workQueue, inProcess, recentlyProcessed);
           executor.execute(listingThread);
   
           generateFiles(1);
   
           Thread.sleep(5000);
       } catch (InterruptedException | ExecutionException e) {
           fail("Unable to generate files" + e.getLocalizedMessage());
       } finally {
           cleanUp();
       }
   }
   ```
   
   The log output shows that `performListing()` is executed approximately every 
200ms:
   
   ```
   2026-04-04T12:01:04,938+0200 INFO  [pool-2-thread-1] 
o.a.p.i.f.FileListingThread - Perform file listing
   2026-04-04T12:01:05,139+0200 INFO  [pool-2-thread-1] 
o.a.p.i.f.FileListingThread - Perform file listing
   2026-04-04T12:01:05,339+0200 INFO  [pool-2-thread-1] 
o.a.p.i.f.FileListingThread - Perform file listing
   2026-04-04T12:01:05,539+0200 INFO  [pool-2-thread-1] 
o.a.p.i.f.FileListingThread - Perform file listing
   ```
   
   ### Are you willing to submit a PR?
   
   - [x] I'm willing to submit a PR!


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to