From 5584f6c1118d0aa4dd8b0a1221392f88dec174d6 Mon Sep 17 00:00:00 2001 From: Liudmila Kornilova Date: Thu, 12 Feb 2026 13:30:26 +0100 Subject: [PATCH] IJPL-233059 Remove assertion on VFS events count Now it's flaky between 1 and 2 (only 'parent' or 'parent' and 'excluded'). In both cases 'excluded' is created as assertNotNull succeeds. To be honest, I don't even understand why it was 1. The test is supposed to assert that event for the child is also fired. The test relies on the timing of fs events and on the fact that events are fired on EDT (the thread where the test is run). GitOrigin-RevId: 3718a22282f039226a0476e6a9ffb84316547068 --- .../testSrc/com/intellij/roots/RootsChangedTest.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java b/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java index 21028b44ddeb..e19cd6bb370e 100644 --- a/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java +++ b/java/java-tests/testSrc/com/intellij/roots/RootsChangedTest.java @@ -537,23 +537,17 @@ public class RootsChangedTest extends JavaModuleTestCase { }; connect.subscribe(VirtualFileManager.VFS_CHANGES, rogueListenerWhichStupidlyGetChildrenRightAway); - myModuleRootListener.reset(); - File iParent = new File(ioRoot, "parent"); assertTrue(iParent.mkdirs()); - TimeoutUtil.sleep(1000); // wait for fsnotifier to pick up the change vRoot.refresh(true, true); TimeoutUtil.sleep(1000); // hope that now async refresh has found "parent" and is waiting for EDT to fire events File ioExcluded = new File(iParent, "excluded"); assertTrue(ioExcluded.mkdirs()); - TimeoutUtil.sleep(1000); // wait for fsnotifier to pick up the change PlatformTestUtil.dispatchAllInvocationEventsInIdeEventQueue(); // now events are fired assertNotNull(LocalFileSystem.getInstance().refreshAndFindFileByIoFile(ioExcluded)); - - myModuleRootListener.assertEventsCount(1); } public void testChangesInsideCompilerOutputDirectoryMustNotLeadToRootsChange() {