Skip to content

Commit

Permalink
tests: increase request waiting timeout to 500ms
Browse files Browse the repository at this point in the history
To give SDK time to prepare and trigger the HTTP request. It seems 100ms
is to small timeout for CI emulator.
  • Loading branch information
wzieba committed Oct 31, 2023
1 parent b5bc33e commit 86d811f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class FunctionalTests {

Thread.sleep((flushInterval / 2).inWholeMilliseconds)

val firstRequestPayload = server.takeRequest(100, TimeUnit.MILLISECONDS)?.toMap()
val firstRequestPayload = server.takeRequest(500, TimeUnit.MILLISECONDS)?.toMap()
assertThat(firstRequestPayload!!["events"]).hasSize(2)

scenario.onActivity {
Expand All @@ -107,7 +107,7 @@ class FunctionalTests {

Thread.sleep(flushInterval.inWholeMilliseconds)

val secondRequestPayload = server.takeRequest(100, TimeUnit.MILLISECONDS)?.toMap()
val secondRequestPayload = server.takeRequest(500, TimeUnit.MILLISECONDS)?.toMap()
assertThat(secondRequestPayload!!["events"]).hasSize(1)
}
}
Expand Down

0 comments on commit 86d811f

Please sign in to comment.