Skip to content

Commit

Permalink
[dev containers] AT-1851 Draft: using Eel/IJent test environment in S…
Browse files Browse the repository at this point in the history
…tarter tests

GitOrigin-RevId: a633dfdcc6593cbf21962c2adc4ddd36326dbc95
  • Loading branch information
Nikita-Kudrin authored and intellij-monorepo-bot committed Jan 22, 2025
1 parent de87cdc commit 6a1570e
Showing 4 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ import org.kodein.di.direct
import org.kodein.di.instance

/**
* The listener do provides [CurrentTestMethod] to DI
* The listener that provides [CurrentTestMethod] to DI
*/
open class CurrentTestMethodProvider : TestExecutionListener {

Original file line number Diff line number Diff line change
@@ -33,10 +33,9 @@ abstract class GlobalPaths(val checkoutDir: Path) {

val testsDirectory = (testHomePath / "tests").createDirectories()

private val cacheDirectory: Path = if (CIServer.instance.isBuildRunningOnCI &&
!System.getProperty("agent.persistent.cache").isNullOrEmpty()
) {
(Paths.get(System.getProperty("agent.persistent.cache"), "perf-tests-cache")).createDirectories()
open val cacheDirectory: Path = if (CIServer.instance.isBuildRunningOnCI &&
!System.getProperty("agent.persistent.cache").isNullOrEmpty()) {
(Paths.get(System.getProperty("agent.persistent.cache"), "test-data-cache")).createDirectories()
}
else {
(testHomePath / "cache").createDirectories()
Original file line number Diff line number Diff line change
@@ -5,13 +5,17 @@ import java.nio.file.Path
import kotlin.time.Duration

interface ProjectInfoSpec {
/**
* "true" - the same project data can be shared between tests
* "false" - before each test the project will be removed and unpacked from scratch/cleaned (depends on the implementation of [ProjectInfoSpec]).
* */
val isReusable: Boolean
val downloadTimeout: Duration

fun downloadAndUnpackProject(): Path?

/**
* Use this to tune/configure project before IDE start
* Use this to tune/configure the project before IDE start
*/
val configureProjectBeforeUse: (IDETestContext) -> Unit

Original file line number Diff line number Diff line change
@@ -7,7 +7,8 @@ data class TestMethod(val name: String, val clazz: String, val clazzSimpleName:
}

/**
* Container that contains current test method reference
* Container that contains the current test method reference.
* Method is provided by [com.intellij.ide.starter.junit5.CurrentTestMethodProvider]
*/
object CurrentTestMethod {
@Volatile

0 comments on commit 6a1570e

Please sign in to comment.