Break infinity loop in the test

This commit is contained in:
Zalim Bashorov
2016-11-03 22:58:26 +03:00
parent 584798d3cd
commit afe6ec92a4
@@ -13,12 +13,16 @@ fun box(): String {
var counter: Int? = null
fun path(metaRunnerId: String) = counter != 2
var i = 0
while (true) {
val name = projectId + "_" + it.id + (if (counter == null) "" else "_$counter")
if (!path(name)) {
return name
}
counter++
i++
if (i > 2) return "Infinity loop: $counter"
}
}
val X = selectMetaRunnerId()