pandaapo commented on PR #4716:
URL: https://github.com/apache/eventmesh/pull/4716#issuecomment-1877365974
I have two questions.
1. Why does this unit test run successfully in CI?
2. Is this bug caused by erroneously closing `this.watchService` object in
`WatchFileTask` constructor called in
`WatchFileManager.registerFileChangeListener()`?
```
private final transient WatchService watchService;
...
public WatchFileTask(String directoryPath) {
...
try (WatchService watchService = FILE_SYSTEM.newWatchService()) {
this.watchService = watchService;
path.register(this.watchService, StandardWatchEventKinds.OVERFLOW,
StandardWatchEventKinds.ENTRY_MODIFY,
StandardWatchEventKinds.ENTRY_CREATE,
StandardWatchEventKinds.ENTRY_DELETE);
} catch (Exception ex) {
throw new UnsupportedOperationException("WatchService registry
fail", ex);
}
}
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]