gmethvin / directory-watcher

A cross-platform Java recursive directory watcher, with a JNA macOS watcher and Scala better-files integration
Apache License 2.0
265 stars 34 forks source link

Path deletion #40

Closed mangum99 closed 5 years ago

mangum99 commented 5 years ago

Unfortunately deletion of folder in Java works differently as deletion of folders per 'hand'. The first one triggers ENTRY_DELETE for all the subfolders and children, whereas the latter triggers only one ENTRY_DELETE for the parent folder. Nevertheless the logic works (I've stopped the test execution, deleted folder structure manually and resumed the test).

I've introduced the awaitility - it speeds up the execution of tests. If you'll like it, we can adapt other tests

mangum99 commented 5 years ago

great, I'll find some time and I'll adapt the tests with awaitility and prepare a separate pull request. Are you planning to accept this PR and make a release out of it soon?

gmethvin commented 5 years ago

I just released 0.9.4 with these changes. I think the test that was failing on OS X was just flaky. Maybe that's something we can look at when adapting the tests.