Skip to content

Commit 5960c17

Browse files
authored
Increase timeout for http request (#2154)
1 parent bfe8d54 commit 5960c17

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

test_runner/src/main/kotlin/ftl/client/google/AppDetails.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ import com.google.testing.model.FileReference
44
import ftl.http.executeWithRetry
55

66
fun getAndroidAppDetails(gcsAppPath: String): String =
7-
GcTesting.get.ApplicationDetailService().getApkDetails(FileReference().apply { gcsPath = gcsAppPath })
8-
.executeWithRetry()?.apkDetail?.apkManifest?.packageName?.toString().orEmpty()
7+
GcTesting.get
8+
.ApplicationDetailService()
9+
.getApkDetails(FileReference().apply { gcsPath = gcsAppPath })
10+
.apply { requestHeaders.set("X-Server-Timeout", 1800) } // 30 min
11+
.executeWithRetry()
12+
?.apkDetail?.apkManifest?.packageName?.toString().orEmpty()

test_runner/src/main/kotlin/ftl/http/ExecuteWithRetry.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ fun <T> AbstractGoogleJsonClientRequest<T>.executeWithRetry(): T = withRetry { t
1919

2020
private inline fun <T> withRetry(crossinline block: () -> T): T = runBlocking {
2121
var lastError: IOException? = null
22-
repeat(4) {
22+
repeat(5) {
2323
try {
2424
return@runBlocking block()
2525
} catch (err: IOException) {

0 commit comments

Comments
 (0)