@@ -9,7 +9,9 @@ package dev.ghostflyby.mcp.rest
99import com.intellij.openapi.application.ApplicationManager
1010import com.intellij.openapi.components.service
1111import com.intellij.openapi.roots.ModuleRootManager
12+ import com.intellij.openapi.util.io.toCanonicalPath
1213import com.intellij.openapi.vfs.LocalFileSystem
14+ import com.intellij.openapi.vfs.VfsUtil
1315import com.intellij.testFramework.IndexingTestUtil
1416import com.intellij.testFramework.junit5.TestApplication
1517import com.intellij.testFramework.junit5.fixture.*
@@ -52,7 +54,7 @@ internal class RestSessionRoutesTest {
5254 @BeforeEach
5355 fun refresh () {
5456 val nestedRootPath = projectPathFixture.get().resolve(" nested-session-root" )
55- nestedRootPath .createDirectories()
57+ val nestedRoot = VfsUtil .createDirectories(nestedRootPath.toCanonicalPath() )
5658 nestedRootPath.resolve(" NestedRootFile.kt" ).writeText(" class NestedRootFile" )
5759 val globDir = projectPathFixture.get().resolve(" glob" )
5860 globDir.resolve(" nested" ).createDirectories()
@@ -65,8 +67,6 @@ internal class RestSessionRoutesTest {
6567 externalPathFixture.get().resolve(" nested" ).createDirectories()
6668 externalPathFixture.get().resolve(" nested/ExternalSearch.kt" )
6769 .writeText(""" class ExternalSearch { val marker = "external needle" }""" )
68- val nestedRoot = LocalFileSystem .getInstance().refreshAndFindFileByNioFile(nestedRootPath)
69- ? : error(" nested root missing" )
7070 ApplicationManager .getApplication().runWriteAction {
7171 val model = ModuleRootManager .getInstance(moduleFixture.get()).modifiableModel
7272 var committed = false
0 commit comments