From 64eb7fad05baf4d71c216e43676e150f576464e5 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 11:35:08 +0200 Subject: [PATCH 01/18] Preparing the project for deployment to maven central --- .github/workflows/release.yaml | 21 ++++++ pom.xml | 120 +++++++++++++++++++++++++-------- 2 files changed, 114 insertions(+), 27 deletions(-) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..eee5ae55 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,21 @@ +name: Publish package to the Maven Central Repository +on: + release: + types: [created] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v4 + with: + java-version: '11' + distribution: 'temurin' + server-id: central + server-username: ${{ secrets.MAVEN_CENTRAL_USER }} + server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} + gpg-passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }} + + - name: Publish package + run: mvn --batch-mode deploy \ No newline at end of file diff --git a/pom.xml b/pom.xml index 1d1df8fd..b36bbbe6 100644 --- a/pom.xml +++ b/pom.xml @@ -35,6 +35,11 @@ java-watch 0.0.1-SNAPSHOT jar + + ${project.groupId}:${project.artifactId} + A java file watcher that works across platforms and supports recursion, single file watches, and tries to make sure no events are missed. Where possible it uses Java's NIO WatchService. + https://github.com/SWAT-engineering/java-watch + BSD-2-Clause @@ -43,6 +48,27 @@ + + + Davy Landman + davy.landman@swat.engineering + swat.engineering + https://www.swat.engineering + + + Sung-Shik Jongmans + sung-shik.jongmans@swat.engineering + swat.engineering + https://www.swat.engineering + + + + + scm:git:git://github.com/SWAT-engineering/java-watch.git + scm:git:ssh://github.com:SWAT-engineering/java-watch.git + https://github.com/SWAT-engineering/java-watch/tree/main/ + + UTF-8 3.42.0 @@ -54,7 +80,7 @@ - + org.apache.maven.plugins maven-compiler-plugin 3.10.1 @@ -63,40 +89,22 @@ -parameters - - org.apache.maven.plugins - maven-source-plugin - 3.2.1 - - - attach-sources - - jar - - - - - + org.apache.maven.plugins maven-release-plugin + 3.1.1 v@{project.version} + + - - org.apache.maven.plugins - maven-javadoc-plugin - 3.4.0 - - -Xdoclint:none - - - + org.apache.maven.plugins maven-surefire-plugin 2.22.2 - + org.jacoco jacoco-maven-plugin 0.8.8 @@ -115,7 +123,7 @@ - + com.mycila license-maven-plugin @@ -142,7 +150,7 @@ - + org.ec4j.maven editorconfig-maven-plugin 0.1.3 @@ -197,6 +205,64 @@ + + release + + + + org.sonatype.central + central-publishing-maven-plugin + 0.7.0 + true + + central + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.4.0 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.2.1 + + + attach-sources + + jar-no-fork + + + + + + + + + checker-framework From 57c1a25f500cedd29769852e1052372e04f43483 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 11:53:43 +0200 Subject: [PATCH 02/18] Improved scm information --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index b36bbbe6..c9c1fa6f 100644 --- a/pom.xml +++ b/pom.xml @@ -65,7 +65,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git - scm:git:ssh://github.com:SWAT-engineering/java-watch.git + scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ From 1a2b552c80fc45673dbf08314315de0452377de9 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 11:54:54 +0200 Subject: [PATCH 03/18] Avoid committing release files --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 8f85f7b7..5ef0a829 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,7 @@ hs_err_pid* replay_pid* /target + +# release plugin state files +/pom.xml.releaseBackup +/release.properties \ No newline at end of file From b6103cb4be6931a76a89cfa9ed7a649dc30d9669 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 11:55:15 +0200 Subject: [PATCH 04/18] Reduced runtime of the windows tests a bit --- .../engineering/swat/watch/SingleDirectoryTests.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/test/java/engineering/swat/watch/SingleDirectoryTests.java b/src/test/java/engineering/swat/watch/SingleDirectoryTests.java index 2738fdb4..e7a00fd9 100644 --- a/src/test/java/engineering/swat/watch/SingleDirectoryTests.java +++ b/src/test/java/engineering/swat/watch/SingleDirectoryTests.java @@ -206,7 +206,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { }); try (var watch = watchConfig.start()) { - Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); + Thread.sleep(TestHelper.SHORT_WAIT.toMillis()); // At this point, the index of last-modified-times inside `watch` is // populated with initial values. @@ -214,7 +214,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { Files.writeString(directory.resolve("b.txt"), "bar"); Files.delete(directory.resolve("c.txt")); Files.createFile(directory.resolve("d.txt")); - Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); + Thread.sleep(TestHelper.SHORT_WAIT.toMillis()); // At this point, regular events have been generated for a.txt, // b.txt, c.txt, and d.txt by the file system. These events won't be // handled by `watch` just yet, though, because the semaphore is @@ -227,7 +227,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { var overflow = new WatchEvent(WatchEvent.Kind.OVERFLOW, directory); ((EventHandlingWatch) watch).handleEvent(overflow); - Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); + Thread.sleep(TestHelper.SHORT_WAIT.toMillis()); // At this point, the current thread has presumably slept long // enough for the `OVERFLOW` event to have been handled by the // rescanner. This means that synthetic events must have been issued @@ -236,7 +236,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { // Readiness achieved: Threads can now start handling non-`OVERFLOW` // events. - semaphore.release(); + semaphore.release(99); await("Overflow should trigger created events") .until(nCreated::get, n -> n >= 2); // 1 synthetic event + >=1 regular event @@ -270,7 +270,6 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { var nDeletedBeforeOverflow = nDeleted.get(); ((EventHandlingWatch) watch).handleEvent(overflow); - Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); await("Overflow shouldn't trigger synthetic created event after file create (and index updated)") .until(nCreated::get, Predicate.isEqual(nCreatedBeforeOverflow)); From 94eb3d44f271299b62a72175a51dcdfafdf95dbd Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 11:58:18 +0200 Subject: [PATCH 05/18] [maven-release-plugin] prepare release v0.5.0-RC1 --- pom.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index c9c1fa6f..0a31f0a6 100644 --- a/pom.xml +++ b/pom.xml @@ -27,13 +27,12 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. --> - + 4.0.0 engineering.swat java-watch - 0.0.1-SNAPSHOT + 0.5.0-RC1 jar ${project.groupId}:${project.artifactId} @@ -67,6 +66,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ + v0.5.0-RC1 @@ -96,7 +96,7 @@ v@{project.version} - + From 5d21bedd003d8ca499884d6713bdb34f3e6d8205 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 11:58:22 +0200 Subject: [PATCH 06/18] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 0a31f0a6..b4fa22ec 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ engineering.swat java-watch - 0.5.0-RC1 + 0.5.0-RC2-SNAPSHOT jar ${project.groupId}:${project.artifactId} @@ -66,7 +66,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ - v0.5.0-RC1 + HEAD From 5012ebbe617ee65f150de876d157b86d22ba1662 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:03:32 +0200 Subject: [PATCH 07/18] Tweaked CI config --- .github/workflows/build.yaml | 2 -- .github/workflows/release.yaml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 21fa1ca7..2e23e277 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,8 +3,6 @@ on: push: branches: - main - tags: - - 'v[0-9]+.*' pull_request: branches: - main diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index eee5ae55..dd2bca0b 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,4 +1,4 @@ -name: Publish package to the Maven Central Repository +name: Publish package maven on: release: types: [created] From 2431de8476178eb1a7f1b09eb38d93bd7e95afe2 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:04:27 +0200 Subject: [PATCH 08/18] Make sure developers get at least the editorconfig extension installed, or suggested --- .vscode/extensions.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .vscode/extensions.json diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 00000000..a7bd62b7 --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,7 @@ +{ + // See http://go.microsoft.com/fwlink/?LinkId=827846 + // for the documentation about the extensions.json format + "recommendations": [ + "editorconfig.editorconfig" // make sure basic editor configs align between developers + ] +} \ No newline at end of file From 02dcdf7294be261f22c6bf69e9fd649103580fe6 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:06:47 +0200 Subject: [PATCH 09/18] Make sure we use the release profile --- .github/workflows/release.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index dd2bca0b..e40d38a7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -18,4 +18,4 @@ jobs: gpg-passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }} - name: Publish package - run: mvn --batch-mode deploy \ No newline at end of file + run: mvn -B -P release deploy \ No newline at end of file From 81a5e9e8b570eec625f8fc05affbcd65fc4624b4 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:10:50 +0200 Subject: [PATCH 10/18] [maven-release-plugin] prepare release v0.5.0-RC2 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index b4fa22ec..693fc5ea 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ engineering.swat java-watch - 0.5.0-RC2-SNAPSHOT + 0.5.0-RC2 jar ${project.groupId}:${project.artifactId} @@ -66,7 +66,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ - HEAD + v0.5.0-RC2 From 594ed8ff668a549b0c36bec6efafaa5515c2a63e Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:10:53 +0200 Subject: [PATCH 11/18] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 693fc5ea..75fdc8a6 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ engineering.swat java-watch - 0.5.0-RC2 + 0.5.0-RC3-SNAPSHOT jar ${project.groupId}:${project.artifactId} @@ -66,7 +66,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ - v0.5.0-RC2 + HEAD From 832a7110b42a4dbcbfcd3903d7fbb5f28c497a56 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:27:32 +0200 Subject: [PATCH 12/18] Using latest versions of plugins --- pom.xml | 37 +++++++++++++++++++++++++++++-------- 1 file changed, 29 insertions(+), 8 deletions(-) diff --git a/pom.xml b/pom.xml index 75fdc8a6..17711041 100644 --- a/pom.xml +++ b/pom.xml @@ -83,7 +83,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.14.0 11 -parameters @@ -102,12 +102,12 @@ org.apache.maven.plugins maven-surefire-plugin - 2.22.2 + 3.5.3 org.jacoco jacoco-maven-plugin - 0.8.8 + 0.8.13 @@ -127,7 +127,7 @@ com.mycila license-maven-plugin - 4.6 + 5.0.0 @@ -165,6 +165,26 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + 3.5.0 + + + enforce-maven + + enforce + + + + + (3.9,) + + + + + + @@ -221,7 +241,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.5 + 3.2.7 sign-artifacts @@ -235,7 +255,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.11.2 attach-javadocs @@ -248,7 +268,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.1 attach-sources @@ -271,6 +291,7 @@ org.apache.maven.plugins maven-dependency-plugin + 3.8.1 @@ -282,7 +303,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.14.0 true 11 From 1deec7671338175b72ef854e2d63f3a5ec1cd6d0 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:30:57 +0200 Subject: [PATCH 13/18] release 0.5.0-RC3 --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 17711041..f10b9944 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ engineering.swat java-watch - 0.5.0-RC3-SNAPSHOT + 0.5.0-RC3 jar ${project.groupId}:${project.artifactId} @@ -66,7 +66,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ - HEAD + v0.5.0-RC3 @@ -173,7 +173,7 @@ enforce-maven - enforce + enforce From 07e8987f5713d53ab822ce411c72dbf83813f55d Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:32:04 +0200 Subject: [PATCH 14/18] Preparing next release cycle --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index f10b9944..6c81e59d 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ engineering.swat java-watch - 0.5.0-RC3 + 0.5.0-RC4-SNAPSHOT jar ${project.groupId}:${project.artifactId} From c877a20047d8ee708f70d4dd7b4a0c030083dfd8 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:40:35 +0200 Subject: [PATCH 15/18] Fixing setup of java plugin for deploying to maven --- .github/workflows/release.yaml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e40d38a7..1f66989f 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -12,10 +12,14 @@ jobs: java-version: '11' distribution: 'temurin' server-id: central - server-username: ${{ secrets.MAVEN_CENTRAL_USER }} - server-password: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + server-username: MAVEN_USERNAME # env variable for username in deploy + server-password: MAVEN_CENTRAL_TOKEN # env variable for token in deploy gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} - gpg-passphrase: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }} + gpg-passphrase: GPG_PASSPHRASE - name: Publish package - run: mvn -B -P release deploy \ No newline at end of file + run: mvn -B -P release deploy + env: + MAVEN_USERNAME: ${{ secrets.MAVEN_CENTRAL_USER }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} + GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSPHRASE }} \ No newline at end of file From da5ee3a6ef1c06ab048dbaaffad68b69b7095e9e Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:41:24 +0200 Subject: [PATCH 16/18] [maven-release-plugin] prepare release v0.5.0-RC4 --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 6c81e59d..dfeaea3b 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ engineering.swat java-watch - 0.5.0-RC4-SNAPSHOT + 0.5.0-RC4 jar ${project.groupId}:${project.artifactId} @@ -66,7 +66,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ - v0.5.0-RC3 + v0.5.0-RC4 From 0b70de7cbb37293aff840136b1fedc0b6f1a857b Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:41:27 +0200 Subject: [PATCH 17/18] [maven-release-plugin] prepare for next development iteration --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index dfeaea3b..ffda2a4b 100644 --- a/pom.xml +++ b/pom.xml @@ -32,7 +32,7 @@ engineering.swat java-watch - 0.5.0-RC4 + 0.5.0-RC5-SNAPSHOT jar ${project.groupId}:${project.artifactId} @@ -66,7 +66,7 @@ scm:git:git://github.com/SWAT-engineering/java-watch.git scm:git:ssh://git@github.com/SWAT-engineering/java-watch.git https://github.com/SWAT-engineering/java-watch/tree/main/ - v0.5.0-RC4 + v0.5.0-RC3 From f38f7b853b5122ab45fc1f3b6131c2f9a9635365 Mon Sep 17 00:00:00 2001 From: Davy Landman Date: Fri, 11 Apr 2025 12:53:40 +0200 Subject: [PATCH 18/18] Undid changes to the test in this PR --- .../engineering/swat/watch/SingleDirectoryTests.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/test/java/engineering/swat/watch/SingleDirectoryTests.java b/src/test/java/engineering/swat/watch/SingleDirectoryTests.java index e7a00fd9..2738fdb4 100644 --- a/src/test/java/engineering/swat/watch/SingleDirectoryTests.java +++ b/src/test/java/engineering/swat/watch/SingleDirectoryTests.java @@ -206,7 +206,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { }); try (var watch = watchConfig.start()) { - Thread.sleep(TestHelper.SHORT_WAIT.toMillis()); + Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); // At this point, the index of last-modified-times inside `watch` is // populated with initial values. @@ -214,7 +214,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { Files.writeString(directory.resolve("b.txt"), "bar"); Files.delete(directory.resolve("c.txt")); Files.createFile(directory.resolve("d.txt")); - Thread.sleep(TestHelper.SHORT_WAIT.toMillis()); + Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); // At this point, regular events have been generated for a.txt, // b.txt, c.txt, and d.txt by the file system. These events won't be // handled by `watch` just yet, though, because the semaphore is @@ -227,7 +227,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { var overflow = new WatchEvent(WatchEvent.Kind.OVERFLOW, directory); ((EventHandlingWatch) watch).handleEvent(overflow); - Thread.sleep(TestHelper.SHORT_WAIT.toMillis()); + Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); // At this point, the current thread has presumably slept long // enough for the `OVERFLOW` event to have been handled by the // rescanner. This means that synthetic events must have been issued @@ -236,7 +236,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { // Readiness achieved: Threads can now start handling non-`OVERFLOW` // events. - semaphore.release(99); + semaphore.release(); await("Overflow should trigger created events") .until(nCreated::get, n -> n >= 2); // 1 synthetic event + >=1 regular event @@ -270,6 +270,7 @@ void indexingRescanOnOverflow() throws IOException, InterruptedException { var nDeletedBeforeOverflow = nDeleted.get(); ((EventHandlingWatch) watch).handleEvent(overflow); + Thread.sleep(TestHelper.NORMAL_WAIT.toMillis()); await("Overflow shouldn't trigger synthetic created event after file create (and index updated)") .until(nCreated::get, Predicate.isEqual(nCreatedBeforeOverflow));