Skip to content

Commit

Permalink
refactor: add constructor with null telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
nicklasl committed Nov 14, 2024
1 parent a0ac42d commit fadb798
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public class FlagResolverContextTest {
void beforeEach() {
final FakeEventSenderEngine fakeEventSender = new FakeEventSenderEngine(new FakeClock());
this.fakeFlagResolver = new FakeFlagResolver();
final FlagResolverClientImpl flagResolver = new FlagResolverClientImpl(fakeFlagResolver, null);
final FlagResolverClientImpl flagResolver = new FlagResolverClientImpl(fakeFlagResolver);
this.confidence = Confidence.create(fakeEventSender, flagResolver);
final FeatureProvider featureProvider = new ConfidenceFeatureProvider(confidence);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ public FlagResolverClientImpl(FlagResolver grpcFlagResolver, @Nullable Telemetry
this.telemetry = telemetry;
}

public FlagResolverClientImpl(FlagResolver grpcFlagResolver) {
this(grpcFlagResolver, null);
}

public CompletableFuture<ResolveFlagsResponse> resolveFlags(
String flagName, ConfidenceValue.Struct context, Boolean isProvider) {
final Instant start = Instant.now();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public void resolveDoesNotContainHeaderWithTelemetryDataWhenDisabled() {
new FakeTelemetryClientInterceptor(null);
final FlagResolverClientImpl flagResolver =
new FlagResolverClientImpl(
new GrpcFlagResolver("fake-secret", channel, nullTelemetryInterceptor), null);
new GrpcFlagResolver("fake-secret", channel, nullTelemetryInterceptor));
confidence = Confidence.create(fakeEventSender, flagResolver);

mockSampleResponse();
Expand Down

0 comments on commit fadb798

Please sign in to comment.