diff --git a/.github/workflows/test.yml.disabled b/.github/workflows/test.yml similarity index 100% rename from .github/workflows/test.yml.disabled rename to .github/workflows/test.yml diff --git a/packagesearch.versions.toml b/packagesearch.versions.toml index 22f3ccb5..fbc78fea 100644 --- a/packagesearch.versions.toml +++ b/packagesearch.versions.toml @@ -21,7 +21,7 @@ logback = "1.4.11" nitrite = "3.4.4" packagesearchApiModels = "3.0.0" jewel = "0.15.0" -ideStarter = "LATEST-EAP-SNAPSHOT" +ideStarter = "233-SNAPSHOT" [libraries] assertk = { module = "com.willowtreeapps.assertk:assertk-jvm", version.ref = "assertk" } diff --git a/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/Utils.kt b/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/Utils.kt index 54dde11d..6b644964 100644 --- a/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/Utils.kt +++ b/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/Utils.kt @@ -2,12 +2,11 @@ package com.jetbrains.packagesearch.plugin.tests import com.intellij.ide.starter.ide.IDETestContext import com.intellij.ide.starter.ide.IdeProductProvider -import com.intellij.ide.starter.junit5.hyphenateWithClass import com.intellij.ide.starter.project.LocalProjectInfo import com.intellij.ide.starter.project.TestCaseTemplate -import com.intellij.ide.starter.runner.CurrentTestMethod -import com.intellij.ide.starter.runner.Starter +import com.intellij.ide.starter.runner.TestContainerImpl import com.intellij.openapi.util.io.toNioPathOrNull +import com.intellij.testIntegration.TestFailedLineManager import com.intellij.tools.ide.performanceTesting.commands.CommandChain import com.intellij.tools.ide.performanceTesting.commands.SdkObject import com.jetbrains.packagesearch.plugin.tests.dumps.DumpPackageSearchModules @@ -18,6 +17,7 @@ import kotlin.io.path.Path import kotlin.io.path.copyTo import kotlin.io.path.createDirectories import kotlin.io.path.isRegularFile +import kotlin.io.path.nameWithoutExtension import kotlin.io.path.outputStream import kotlin.io.path.readLines import kotlin.io.path.toPath @@ -154,17 +154,14 @@ private fun fetchJavaLocation(javaHome: Path): JavaLocation { * @param projectPath The path to the project. * @return The IDETestContext object. */ -internal fun buildIdeContext(projectPath: Path): IDETestContext { +internal fun buildIdeContext(projectPath: Path, context: TestContainerImpl): IDETestContext { val testCase = object : TestCaseTemplate(IdeProductProvider.IC) { val project = withProject(LocalProjectInfo(projectPath)) } val sdk = fetchJavaLocation().toSdkObject() - return Starter.newContext( - CurrentTestMethod.hyphenateWithClass(), - testCase.project.useRelease("233.3.5"), - ) + return context.initializeTestContext(testName = projectPath.nameWithoutExtension, testCase.project) .setSharedIndexesDownload(true) .addProjectToTrustedLocations() .disableFusSendingOnIdeClose() diff --git a/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/projectservice/PackageSearchProjectServiceTest.kt b/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/projectservice/PackageSearchProjectServiceTest.kt index 19d0521d..c12131d2 100644 --- a/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/projectservice/PackageSearchProjectServiceTest.kt +++ b/plugin/src/test/kotlin/com/jetbrains/packagesearch/plugin/tests/projectservice/PackageSearchProjectServiceTest.kt @@ -1,6 +1,8 @@ package com.jetbrains.packagesearch.plugin.tests.projectservice import com.intellij.ide.starter.junit5.JUnit5StarterAssistant +import com.intellij.ide.starter.runner.TestContainerImpl +import com.intellij.testIntegration.TestFailedLineManager import com.intellij.tools.ide.performanceTesting.commands.CommandChain import com.intellij.tools.ide.performanceTesting.commands.exitApp import com.intellij.tools.ide.performanceTesting.commands.waitForSmartMode @@ -29,6 +31,9 @@ import org.junit.jupiter.params.provider.MethodSource @ExtendWith(JUnit5StarterAssistant::class) abstract class PackageSearchProjectServiceTest { + private lateinit var testInfo: TestFailedLineManager.TestInfo + private lateinit var context: TestContainerImpl + abstract val resourcePath: String private fun getProjects() = @@ -68,7 +73,7 @@ abstract class PackageSearchProjectServiceTest { editProject(projectDir) //IDE context setup - val testContext = buildIdeContext(projectDir) + val testContext = buildIdeContext(projectDir, context) val dumpPkgsDataChain = CommandChain() .waitForSmartMode()