fixing test after changing cleanup scheme - first it is now required to rebuild sources, and therefore consumed memory is increased
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.junit.Test
|
||||
import org.gradle.api.logging.LogLevel
|
||||
|
||||
class SimpleKotlinGradleIT : BaseGradleIT() {
|
||||
|
||||
|
||||
+5
-4
@@ -63,12 +63,13 @@ class KotlinGradleIT: BaseGradleIT() {
|
||||
}
|
||||
|
||||
for (i in 1..3) {
|
||||
project.build(userVariantArg, "build", options = BaseGradleIT.BuildOptions(withDaemon = true)) {
|
||||
project.build(userVariantArg, "clean", "build", options = BaseGradleIT.BuildOptions(withDaemon = true)) {
|
||||
assertSuccessful()
|
||||
val matches = "\\[PERF\\] Used memory after build: (\\d+) kb \\(([+-]?\\d+) kb\\)".toRegex().find(output)
|
||||
assert(matches != null && matches.groups.size == 3) { "Used memory after build is not reported by plugin" }
|
||||
val matches = "\\[PERF\\] Used memory after build: (\\d+) kb \\(difference since build start: ([+-]?\\d+) kb\\)".toRegex().find(output)
|
||||
assert(matches != null && matches.groups.size == 3) { "Used memory after build is not reported by plugin on attempt $i" }
|
||||
val reportedGrowth = matches!!.groups.get(2)!!.value.removePrefix("+").toInt()
|
||||
assert(reportedGrowth <= 700) { "Used memory growth $reportedGrowth > 700" }
|
||||
val expectedGrowthLimit = 2000
|
||||
assert(reportedGrowth <= expectedGrowthLimit) { "Used memory growth $reportedGrowth > $expectedGrowthLimit" }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user