Skip to content

Commit

Permalink
Refresh VFS
Browse files Browse the repository at this point in the history
  • Loading branch information
fkorotkov committed Feb 17, 2022
1 parent 2c78cea commit ac4560c
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.intellij.openapi.util.io.FileUtil;
import com.intellij.openapi.vfs.VfsUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.openapi.vfs.VirtualFileManager;
import com.intellij.protobuf.fixtures.PbCodeInsightFixtureTestCase;
import com.intellij.protobuf.lang.resolve.FileResolveProvider.ChildEntry;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -49,6 +50,7 @@ public void tearDown() throws Exception {
public void testFindFilePrefersFirstListedPath() throws Exception {
FileUtil.writeToFile(new File(tempDir, "com/foo/dir/foo.proto"), "// foo");

VirtualFileManager.getInstance().syncRefresh();

FileResolveProvider resolver = new AdditionalLibrariesFileResolveProvider();
VirtualFile foo = resolver.findFile("com/foo/dir/foo.proto", getProject());
Expand All @@ -62,6 +64,7 @@ public void testGetChildEntries() throws Exception {
FileUtil.writeToFile(new File(tempDir, "com/foo/dir/foo.proto"), "// foo");
FileUtil.writeToFile(new File(tempDir, "com/foo/dir/bar.proto"), "// bar");

VirtualFileManager.getInstance().syncRefresh();

FileResolveProvider resolver = new AdditionalLibrariesFileResolveProvider();
assertContainsElements(
Expand Down

0 comments on commit ac4560c

Please sign in to comment.