mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-05 01:50:56 +07:00
[vfs][tests] trying to make PersistentFsTest more stable
GitOrigin-RevId: 9c6829594124bbcf77b0ba174b23639d9e9e17cf
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a4ab505ebc
commit
8f2098beba
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
|
||||
package com.intellij.openapi.vfs.newvfs.persistent;
|
||||
|
||||
import com.intellij.CacheSwitcher;
|
||||
@@ -1043,6 +1043,11 @@ public class PersistentFsTest extends BareTestFixtureTestCase {
|
||||
@Test
|
||||
public void testSearchingForJarRootWhenItsNotCached() throws IOException {
|
||||
// IDEA-341011 PersistentFSImpl.cacheMissedRootFromPersistence fails to find jars because it uses name instead of path
|
||||
PersistentFSImpl fs = (PersistentFSImpl)PersistentFS.getInstance();
|
||||
// ensure clean VFS
|
||||
fs.disconnect();
|
||||
fs.connect();
|
||||
|
||||
File root = tempDirectory.newDirectory("out");
|
||||
FileUtil.writeToFile(new File(root, "fileInJar.txt"), "some text");
|
||||
|
||||
@@ -1053,8 +1058,7 @@ public class PersistentFsTest extends BareTestFixtureTestCase {
|
||||
VirtualFile fileInJar = jarRoot.findChild("fileInJar.txt");
|
||||
assertNotNull(fileInJar);
|
||||
|
||||
// drop caches
|
||||
PersistentFSImpl fs = (PersistentFSImpl)PersistentFS.getInstance();
|
||||
// clear in-memory caches:
|
||||
fs.disconnect();
|
||||
fs.connect();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user