Skip to content

Commit ddd34dd

Browse files
committed
Fix flaky test
1 parent 0ad6bfc commit ddd34dd

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

envoy-control-tests/src/main/kotlin/pl/allegro/tech/servicemesh/envoycontrol/EndpointMetadataMergingTests.kt

+6-3
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import pl.allegro.tech.servicemesh.envoycontrol.config.envoy.CallStats
99
import pl.allegro.tech.servicemesh.envoycontrol.config.envoy.EnvoyExtension
1010
import pl.allegro.tech.servicemesh.envoycontrol.config.envoycontrol.EnvoyControlExtension
1111
import pl.allegro.tech.servicemesh.envoycontrol.config.service.EchoServiceExtension
12+
import java.time.Duration
1213

1314
open class EndpointMetadataMergingTests {
1415

@@ -52,9 +53,11 @@ open class EndpointMetadataMergingTests {
5253
val dolomStats = callEchoServiceRepeatedly(service, repeat = 1, tag = "dolom")
5354

5455
// then
55-
assertThat(ipsumStats.hits(service)).isEqualTo(1)
56-
assertThat(loremStats.hits(service)).isEqualTo(1)
57-
assertThat(dolomStats.hits(service)).isEqualTo(1)
56+
untilAsserted(wait = Duration.ofSeconds(30)) {
57+
assertThat(ipsumStats.hits(service)).isEqualTo(1)
58+
assertThat(loremStats.hits(service)).isEqualTo(1)
59+
assertThat(dolomStats.hits(service)).isEqualTo(1)
60+
}
5861
}
5962

6063
protected open fun callEchoServiceRepeatedly(

0 commit comments

Comments
 (0)