Skip to content

Commit fb1cd6e

Browse files
committed
fix unit test poll
1 parent b6c2d6e commit fb1cd6e

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

aws-xray/src/test/java/io/opentelemetry/contrib/awsxray/AwsXrayRemoteSamplerTest.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,15 @@ void defaultInitialSampler() {
170170

171171
@Test
172172
void parentBasedXraySamplerAfterDefaultSampler() {
173-
try (AwsXrayRemoteSampler sampler = AwsXrayRemoteSampler.newBuilder(Resource.empty()).build()) {
173+
rulesResponse.set(RULE_RESPONSE_1);
174+
try (AwsXrayRemoteSampler samplerWithLongerPollingInterval =
175+
AwsXrayRemoteSampler.newBuilder(Resource.empty())
176+
.setInitialSampler(Sampler.alwaysOn())
177+
.setEndpoint(server.httpUri().toString())
178+
.setPollingInterval(Duration.ofMillis(5))
179+
.build()) {
174180
await()
181+
.pollDelay(Duration.ofMillis(10))
175182
.untilAsserted(
176183
() -> {
177184
assertThat(sampler.getDescription())

0 commit comments

Comments
 (0)