Skip to content

Commit

Permalink
fixup! feat: refactor GrpcConnector to use grpc builtin reconnection
Browse files Browse the repository at this point in the history
Signed-off-by: Bernd Warmuth <[email protected]>
  • Loading branch information
Bernd Warmuth committed Dec 18, 2024
1 parent 3f26787 commit b68b290
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public final class Config {
public static final String LRU_CACHE = CacheType.LRU.getValue();
static final String DEFAULT_CACHE = LRU_CACHE;

static final int DEFAULT_MAX_EVENT_STREAM_RETRIES = 7;
static final int BASE_EVENT_STREAM_RETRY_BACKOFF_MS = 1000;

static String fallBackToEnvOrDefault(String key, String defaultValue) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ public class FlagdOptions {
private int maxCacheSize = fallBackToEnvOrDefault(Config.MAX_CACHE_SIZE_ENV_VAR_NAME,
Config.DEFAULT_MAX_CACHE_SIZE);

/**
* Max event stream connection retries.
*/
@Builder.Default
private int maxEventStreamRetries = fallBackToEnvOrDefault(Config.MAX_EVENT_STREAM_RETRIES_ENV_VAR_NAME,
Config.DEFAULT_MAX_EVENT_STREAM_RETRIES);

/**
* Backoff interval in milliseconds.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ void TestDefaults() {
assertNull(builder.getSocketPath());
assertEquals(DEFAULT_CACHE, builder.getCacheType());
assertEquals(DEFAULT_MAX_CACHE_SIZE, builder.getMaxCacheSize());
assertEquals(DEFAULT_MAX_EVENT_STREAM_RETRIES, builder.getMaxEventStreamRetries());
assertNull(builder.getSelector());
assertNull(builder.getOpenTelemetry());
assertNull(builder.getCustomConnector());
Expand All @@ -48,7 +47,6 @@ void TestBuilderOptions() {
.certPath("etc/cert/ca.crt")
.cacheType("lru")
.maxCacheSize(100)
.maxEventStreamRetries(1)
.selector("app=weatherApp")
.offlineFlagSourcePath("some-path")
.openTelemetry(openTelemetry)
Expand All @@ -64,7 +62,6 @@ void TestBuilderOptions() {
assertEquals("etc/cert/ca.crt", flagdOptions.getCertPath());
assertEquals("lru", flagdOptions.getCacheType());
assertEquals(100, flagdOptions.getMaxCacheSize());
assertEquals(1, flagdOptions.getMaxEventStreamRetries());
assertEquals("app=weatherApp", flagdOptions.getSelector());
assertEquals("some-path", flagdOptions.getOfflineFlagSourcePath());
assertEquals(openTelemetry, flagdOptions.getOpenTelemetry());
Expand Down Expand Up @@ -137,7 +134,6 @@ void usesSetOldAndNewName() {
}



@Test
void testInProcessProvider_noPortConfigured_defaultsToCorrectPort() {
FlagdOptions flagdOptions = FlagdOptions.builder()
Expand Down

0 comments on commit b68b290

Please sign in to comment.