Minor: remove duplicated daemon stop in tests
KT-8487
This commit is contained in:
+1
-18
@@ -16,13 +16,7 @@ class KotlinGradlePluginJpsParametrizedIT : BaseIncrementalGradleIT() {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
fun testFromJps() {
|
fun testFromJps() {
|
||||||
try {
|
JpsTestProject(jpsResourcesPath, relativePath).performAndAssertBuildStages(weakTesting = true)
|
||||||
JpsTestProject(jpsResourcesPath, relativePath).performAndAssertBuildStages(weakTesting = true)
|
|
||||||
}
|
|
||||||
finally {
|
|
||||||
if (defaultBuildOptions().withDaemon)
|
|
||||||
checkRecycleDaemon()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun defaultBuildOptions(): BuildOptions = BuildOptions(withDaemon = true)
|
override fun defaultBuildOptions(): BuildOptions = BuildOptions(withDaemon = true)
|
||||||
@@ -35,9 +29,6 @@ class KotlinGradlePluginJpsParametrizedIT : BaseIncrementalGradleIT() {
|
|||||||
File(jpsResourcesPath, "custom"),
|
File(jpsResourcesPath, "custom"),
|
||||||
File(jpsResourcesPath, "lookupTracker"))
|
File(jpsResourcesPath, "lookupTracker"))
|
||||||
|
|
||||||
val MAX_TESTS_ON_SINGLE_DAEMON = 20
|
|
||||||
private var testsCounter = 0
|
|
||||||
|
|
||||||
@Suppress("unused")
|
@Suppress("unused")
|
||||||
@Parameterized.Parameters(name = "{index}: {0}")
|
@Parameterized.Parameters(name = "{index}: {0}")
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@@ -47,14 +38,6 @@ class KotlinGradlePluginJpsParametrizedIT : BaseIncrementalGradleIT() {
|
|||||||
.filter { it.isDirectory && isJpsTestProject(it) }
|
.filter { it.isDirectory && isJpsTestProject(it) }
|
||||||
.map { arrayOf(it.toRelativeString(jpsResourcesPath)) }
|
.map { arrayOf(it.toRelativeString(jpsResourcesPath)) }
|
||||||
.toList()
|
.toList()
|
||||||
|
|
||||||
@Synchronized
|
|
||||||
fun checkRecycleDaemon() {
|
|
||||||
if (testsCounter++ > MAX_TESTS_ON_SINGLE_DAEMON) {
|
|
||||||
BaseGradleIT.tearDownAll()
|
|
||||||
testsCounter = 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user