void () { PersistentFSImpl fs = (PersistentFSImpl)PersistentFS.getInstance(); File file = tempDirectory.newFile("file.txt", "x".getBytes(UTF_8)); VirtualFile vDir = refreshAndFind(file.getParentFile()); VirtualFile vf = assertOneElement(vDir.getChildren()); assertEquals("file.txt", vf.getName()); List<Future<?>> futures = new ArrayList<>(); String oldName = file.getName(); for (int i = 0; i < 100; i++) { int u = i % oldName.length(); Future<?> f = ApplicationManager.getApplication().executeOnPooledThread(() -> { String newName = oldName.substring(0, u) + Character.toUpperCase(oldName.charAt(u)) + oldName.substring(u + 1); try { Files.move(file.toPath(), file.toPath().resolveSibling(newName), StandardCopyOption.ATOMIC_MOVE); } catch (NoSuchFileException ignored) { } catch (IOException e) { throw new UncheckedIOException(e); } }); futures.add(f); } for (int i = 0; i < 10; i++) { Future<?> f = ApplicationManager.getApplication().executeOnPooledThread(() -> { for (int u = 0; u < 100; u++) { List<? extends ChildInfo> infos = fs.listAll(vDir); assertOneElement(infos); } }); futures.add(f); } runInEdtAndWait(() -> { for (Future<?> future : futures) { PlatformTestUtil.waitForFuture(future, 10_000); } }); }