Skip to content

Commit

Permalink
fix unit test poll
Browse files Browse the repository at this point in the history
  • Loading branch information
jj22ee committed Oct 4, 2024
1 parent b6c2d6e commit fb1cd6e
Showing 1 changed file with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,15 @@ void defaultInitialSampler() {

@Test
void parentBasedXraySamplerAfterDefaultSampler() {
try (AwsXrayRemoteSampler sampler = AwsXrayRemoteSampler.newBuilder(Resource.empty()).build()) {
rulesResponse.set(RULE_RESPONSE_1);
try (AwsXrayRemoteSampler samplerWithLongerPollingInterval =
AwsXrayRemoteSampler.newBuilder(Resource.empty())
.setInitialSampler(Sampler.alwaysOn())
.setEndpoint(server.httpUri().toString())
.setPollingInterval(Duration.ofMillis(5))
.build()) {
await()
.pollDelay(Duration.ofMillis(10))
.untilAsserted(
() -> {
assertThat(sampler.getDescription())
Expand Down

0 comments on commit fb1cd6e

Please sign in to comment.