mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
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
This commit is contained in:
committed by
intellij-monorepo-bot
parent
3d9d218945
commit
5584f6c111
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user