Increase timeout for flaky muted tests synchronization requests
This commit is contained in:
committed by
TeamCityServer
parent
f2ecf7f666
commit
532124d9a1
+5
-3
@@ -12,6 +12,7 @@ private val headers = mapOf("Content-type" to "application/json", "Accept" to "a
|
||||
private val authUser = object : Authorization {
|
||||
override val header = "Authorization" to "Bearer ${getMandatoryProperty("org.jetbrains.kotlin.test.mutes.teamcity.server.token")}"
|
||||
}
|
||||
private const val customTimeout = DEFAULT_TIMEOUT * 4
|
||||
|
||||
|
||||
internal fun getMutedTestsOnTeamcityForRootProject(rootScopeId: String): List<MuteTestJson> {
|
||||
@@ -33,7 +34,7 @@ private fun traverseAll(requestHref: String, requestParams: Map<String, String>)
|
||||
val jsonResponses = mutableListOf<JsonNode>()
|
||||
|
||||
fun request(url: String, params: Map<String, String>): String {
|
||||
val currentResponse = khttp.get(url, headers, params, auth = authUser)
|
||||
val currentResponse = khttp.get(url, headers, params, auth = authUser, timeout = customTimeout)
|
||||
checkResponseAndLog(currentResponse)
|
||||
val currentJsonResponse = jsonObjectMapper.readTree(currentResponse.text)
|
||||
jsonResponses.add(currentJsonResponse)
|
||||
@@ -54,7 +55,8 @@ internal fun uploadMutedTests(uploadMap: Map<String, MuteTestJson>) {
|
||||
"$buildServerUrl/app/rest/mutes",
|
||||
headers = headers,
|
||||
data = jsonObjectMapper.writeValueAsString(muteTestJson),
|
||||
auth = authUser
|
||||
auth = authUser,
|
||||
timeout = customTimeout
|
||||
)
|
||||
checkResponseAndLog(response)
|
||||
}
|
||||
@@ -66,7 +68,7 @@ internal fun deleteMutedTests(deleteMap: Map<String, MuteTestJson>) {
|
||||
"$buildServerUrl/app/rest/mutes/id:${muteTestJson.id}",
|
||||
headers = headers,
|
||||
auth = authUser,
|
||||
timeout = DEFAULT_TIMEOUT * 2
|
||||
timeout = customTimeout
|
||||
)
|
||||
try {
|
||||
checkResponseAndLog(response)
|
||||
|
||||
Reference in New Issue
Block a user