Skip to content

Commit

Permalink
Fix flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
Ferdudas97 committed Jan 18, 2023
1 parent 0ad6bfc commit ddd34dd
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import pl.allegro.tech.servicemesh.envoycontrol.config.envoy.CallStats
import pl.allegro.tech.servicemesh.envoycontrol.config.envoy.EnvoyExtension
import pl.allegro.tech.servicemesh.envoycontrol.config.envoycontrol.EnvoyControlExtension
import pl.allegro.tech.servicemesh.envoycontrol.config.service.EchoServiceExtension
import java.time.Duration

open class EndpointMetadataMergingTests {

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

// then
assertThat(ipsumStats.hits(service)).isEqualTo(1)
assertThat(loremStats.hits(service)).isEqualTo(1)
assertThat(dolomStats.hits(service)).isEqualTo(1)
untilAsserted(wait = Duration.ofSeconds(30)) {
assertThat(ipsumStats.hits(service)).isEqualTo(1)
assertThat(loremStats.hits(service)).isEqualTo(1)
assertThat(dolomStats.hits(service)).isEqualTo(1)
}
}

protected open fun callEchoServiceRepeatedly(
Expand Down

0 comments on commit ddd34dd

Please sign in to comment.