Skip to content

Commit e65e93f

Browse files
authored
[Functions] Bump all test timeouts to 10 seconds (#6821)
Integration tests are being flaky due to short timeouts. no-changelog
1 parent 9da772e commit e65e93f

File tree

1 file changed

+5
-5
lines changed
  • firebase-functions/src/androidTest/java/com/google/firebase/functions

1 file changed

+5
-5
lines changed

firebase-functions/src/androidTest/java/com/google/firebase/functions/StreamTests.kt

+5-5
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ class StreamTests {
102102

103103
val flow = function.stream(input).asFlow()
104104
try {
105-
withTimeout(1000) {
105+
withTimeout(10_000) {
106106
flow.collect { response ->
107107
if (response is StreamResponse.Message) {
108108
messages.add(response)
@@ -146,14 +146,14 @@ class StreamTests {
146146
@Test
147147
fun nonExistentFunction_receivesError() = runBlocking {
148148
val function =
149-
functions.getHttpsCallable("nonexistentFunction").withTimeout(2000, TimeUnit.MILLISECONDS)
149+
functions.getHttpsCallable("nonexistentFunction").withTimeout(10_000, TimeUnit.MILLISECONDS)
150150
val subscriber = StreamSubscriber()
151151

152152
function.stream().subscribe(subscriber)
153153

154-
withTimeout(2000) {
154+
withTimeout(10_000) {
155155
while (subscriber.throwable == null) {
156-
delay(100)
156+
delay(1_000)
157157
}
158158
}
159159

@@ -195,7 +195,7 @@ class StreamTests {
195195

196196
function.stream(mapOf("data" to "test")).subscribe(subscriber)
197197

198-
withTimeout(2000) { delay(500) }
198+
withTimeout(10_000) { delay(1000) }
199199
assertThat(subscriber.throwable).isNull()
200200
assertThat(subscriber.messages).isEmpty()
201201
assertThat(subscriber.result).isNull()

0 commit comments

Comments
 (0)