Skip to content

Commit

Permalink
Adapt brittle test to Wavefront SDK 2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
shakuzen committed Jul 3, 2020
1 parent 5824553 commit a44c720
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;

import static org.assertj.core.api.Assertions.*;
import static org.mockito.Mockito.*;
Expand Down Expand Up @@ -136,8 +135,7 @@ void publishDistribution() throws IOException {
@Issue("#2173")
void defaultStepConfigAffectsWavefrontBuilder() {
WavefrontClient.Builder defaultSenderBuilder = WavefrontMeterRegistry.getDefaultSenderBuilder(config);
assertThat(defaultSenderBuilder).hasFieldOrPropertyWithValue("flushInterval", 60L);
assertThat(defaultSenderBuilder).hasFieldOrPropertyWithValue("flushIntervalTimeUnit", TimeUnit.SECONDS);
assertThat(defaultSenderBuilder).hasFieldOrPropertyWithValue("flushIntervalSeconds", 60);
}

@Test
Expand Down Expand Up @@ -170,8 +168,7 @@ public Duration step() {
};
WavefrontClient.Builder builder = WavefrontMeterRegistry.getDefaultSenderBuilder(customConfig);
WavefrontClient sender = builder.build();
assertThat(builder).hasFieldOrPropertyWithValue("flushInterval", 15L);
assertThat(builder).hasFieldOrPropertyWithValue("flushIntervalTimeUnit", TimeUnit.SECONDS);
assertThat(builder).hasFieldOrPropertyWithValue("flushIntervalSeconds", 15);
assertThat(sender).extracting("reportingService").hasFieldOrPropertyWithValue("uri", URI.create("https://example.com"));
assertThat(sender).extracting("reportingService").hasFieldOrPropertyWithValue("token", "apiToken");
assertThat(sender).hasFieldOrPropertyWithValue("batchSize", 20);
Expand Down

0 comments on commit a44c720

Please sign in to comment.