diff --git a/CHANGES.md b/CHANGES.md index 7bf2577e6..20fbf9eeb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -11,3 +11,4 @@ * Expose AgentNativeConnectionProvider on Connection and Application Module - Issue #673 * Create DatacenterAwareConfig to add Hosts in CQL Session Through ecc.yml - Issue #671 * Create Initial project Structure for Agent - Issue #695 +* Retry Policy for Jmx Connection -Issue #700 diff --git a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/config/connection/RetryPolicyConfig.java b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/config/connection/RetryPolicyConfig.java index e4aa59012..3767b034c 100644 --- a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/config/connection/RetryPolicyConfig.java +++ b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/config/connection/RetryPolicyConfig.java @@ -20,44 +20,20 @@ public final class RetryPolicyConfig { - - private static final int DEFAULT_MAX_ATTEMPTS = 5; - private static final long DEFAULT_DELAY = 5000; - private static final long DEFAULT_MAX_DELAY = 30000; - private static final long DEFAULT_INITIAL_DELAY = 86400; - private static final long DEFAULT_FIXED_DELAY = 86400; - - @JsonProperty ("maxAttempts") - private Integer myMaxAttempts = DEFAULT_MAX_ATTEMPTS; - @JsonProperty ("delay") - private long myDelay = DEFAULT_DELAY; - @JsonProperty ("maxDelay") - private long myMaxDelay = DEFAULT_MAX_DELAY; - @JsonProperty ("unit") - private String myUnit = "seconds"; - @JsonProperty ("initialDelay") - private long myInitialDelay = DEFAULT_INITIAL_DELAY; - @JsonProperty ("fixedDelay") - private long myFixedDelay = DEFAULT_FIXED_DELAY; - public RetryPolicyConfig() { } - public RetryPolicyConfig(final Integer maxAttempts, - final Integer delay, - final Integer maxDelay, - final String unit, - final long initialDelay, - final long fixedDelay) - { - this.myMaxAttempts = maxAttempts; - this.myDelay = convertToMillis(delay, unit); - this.myMaxDelay = convertToMillis(maxDelay, unit); - this.myUnit = unit; - this.myInitialDelay = initialDelay; - this.myFixedDelay = fixedDelay; - } + private static final int DEFAULT_MAX_ATTEMPTS = 5; + private static final long DEFAULT_DELAY_IN_MS = 5000; + private static final long DEFAULT_MAX_DELAY_IN_MS = 30000; + private static final long DEFAULT_INITIAL_DELAY_IN_MS = 86400000; + private static final long DEFAULT_FIXED_DELAY_IN_MS = 86400000; + private static final String DEFAULT_TIME_UNIT_IN_SECOND = "seconds"; + private RetryPolicyConfig.RetryDelay myRetryDelay = new RetryPolicyConfig.RetryDelay(); + private RetryPolicyConfig.RetrySchedule myRetrySchedule = new RetryPolicyConfig.RetrySchedule(); + @JsonProperty ("maxAttempts") + private Integer myMaxAttempts = DEFAULT_MAX_ATTEMPTS; @JsonProperty ("maxAttempts") public Integer getMaxAttempts() @@ -68,90 +44,184 @@ public Integer getMaxAttempts() @JsonProperty ("maxAttempts") public void setMaxAttempts(final Integer maxAttempts) { - this.myMaxAttempts = maxAttempts; + if (maxAttempts != null) + { + this.myMaxAttempts = maxAttempts; + } } @JsonProperty ("delay") - public long getDelay() + public void setRetryDelay(final RetryDelay retryDelay) { - return myDelay; + myRetryDelay = retryDelay; } @JsonProperty ("delay") - public void setDelay(final Integer delay) + public RetryDelay getRetryDelay() { - this.myDelay = convertToMillis(delay, myUnit); + return myRetryDelay; } - @JsonProperty ("maxDelay") - public long getMaxDelay() + @JsonProperty ("retrySchedule") + public RetrySchedule getRetrySchedule() { - return myMaxDelay; + return myRetrySchedule; } - @JsonProperty ("maxDelay") - public void setMaxDelay(final Integer maxDelay) + @JsonProperty ("retrySchedule") + public void setRetrySchedule(final RetrySchedule retrySchedule) { - this.myMaxDelay = convertToMillis(maxDelay, myUnit); + myRetrySchedule = retrySchedule; } - @JsonProperty ("unit") - public String getUnit() + private static long convertToMillis(final Long value, final String unit) { - return myUnit; + return switch (unit.toLowerCase(Locale.US)) + { + case "milliseconds" -> value; + case "seconds" -> TimeUnit.SECONDS.toMillis(value); + case "minutes" -> TimeUnit.MINUTES.toMillis(value); + case "hours" -> TimeUnit.HOURS.toMillis(value); + case "days" -> TimeUnit.DAYS.toMillis(value); + default -> throw new IllegalArgumentException("Unsupported time unit: " + unit); + }; } - @JsonProperty ("unit") - public void setUnit(final String unit) + /** + * Configuration for retry delay parameter. + */ + public static final class RetryDelay { - this.myUnit = unit; - // Recalculate delays with the new unit - this.myDelay = convertToMillis((int) TimeUnit.MILLISECONDS.toSeconds(this.myDelay), unit); - this.myMaxDelay = convertToMillis((int) TimeUnit.MILLISECONDS.toSeconds(this.myMaxDelay), unit); - } + public RetryDelay() + { - @JsonProperty ("initialDelay") - public long getInitialDelay() - { - return myInitialDelay; - } + } - @JsonProperty ("initialDelay") - public void setInitialDelay(final Integer initialDelay) - { - this.myInitialDelay = convertToMillis(initialDelay, myUnit); - } + @JsonProperty ("start") + private long myDelay = DEFAULT_DELAY_IN_MS; + @JsonProperty ("max") + private long myMaxDelay = DEFAULT_MAX_DELAY_IN_MS; + @JsonProperty ("unit") + private String myUnit = DEFAULT_TIME_UNIT_IN_SECOND; - @JsonProperty ("fixedDelay") - public long getFixedDelay() - { - return myFixedDelay; - } + @JsonProperty ("start") + public long getStartDelay() + { + return myDelay; + } - @JsonProperty ("fixedDelay") - public void setFixedDelay(final Integer fixedDelay) - { - this.myFixedDelay = convertToMillis(fixedDelay, myUnit); - } + @JsonProperty ("start") + public void setStartDelay(final Long delay) + { + if (delay != null) + { + long convertedDelay = convertToMillis(delay, myUnit); + if (convertedDelay > myMaxDelay) + { + throw new IllegalArgumentException("Start delay cannot be greater than max delay."); + } + this.myDelay = convertToMillis(delay, myUnit); + } + } - private long convertToMillis(final Integer value, final String unit) - { - return switch (unit.toLowerCase(Locale.ENGLISH)) + @JsonProperty ("max") + public long getMaxDelay() { - case "milliseconds" -> value; - case "seconds" -> TimeUnit.SECONDS.toMillis(value); - case "minutes" -> TimeUnit.MINUTES.toMillis(value); - default -> throw new IllegalArgumentException("Unsupported time unit: " + unit); - }; + return myMaxDelay; + } + + @JsonProperty ("max") + public void setMaxDelay(final Long maxDelay) + { + if (maxDelay != null) + { + long convertedMaxDelay = convertToMillis(maxDelay, myUnit); + if (convertedMaxDelay < myDelay) + { + throw new IllegalArgumentException("Max delay cannot be less than start delay."); + } + this.myMaxDelay = convertToMillis(maxDelay, myUnit); + } + } + + @JsonProperty ("unit") + public String getUnit() + { + return myUnit; + } + + @JsonProperty ("unit") + public void setUnit(final String unit) + { + if (unit != null && !unit.isBlank()) + { + this.myUnit = unit; + this.myDelay = convertToMillis(TimeUnit.MILLISECONDS.toSeconds(this.myDelay), unit); + this.myMaxDelay = convertToMillis(TimeUnit.MILLISECONDS.toSeconds(this.myMaxDelay), unit); + } + } } - public long currentDelay(final Integer count) + public static final class RetrySchedule { - long currentDelay = myDelay * count; - if (currentDelay > myMaxDelay) + public RetrySchedule() + { + + } + + @JsonProperty ("initialDelay") + private long myInitialDelay = DEFAULT_INITIAL_DELAY_IN_MS; + @JsonProperty ("fixedDelay") + private long myFixedDelay = DEFAULT_FIXED_DELAY_IN_MS; + @JsonProperty ("unit") + private String myUnit = DEFAULT_TIME_UNIT_IN_SECOND; + + @JsonProperty ("initialDelay") + public long getInitialDelay() + { + return myInitialDelay; + } + + @JsonProperty ("initialDelay") + public void setInitialDelay(final Long initialDelay) + { + if (initialDelay != null) + { + this.myInitialDelay = convertToMillis(initialDelay, myUnit); + } + } + + @JsonProperty ("fixedDelay") + public long getFixedDelay() + { + return myFixedDelay; + } + + @JsonProperty ("fixedDelay") + public void setFixedDelay(final Long fixedDelay) + { + if (fixedDelay != null) + { + this.myFixedDelay = convertToMillis(fixedDelay, myUnit); + } + } + + @JsonProperty ("unit") + public String getUnit() { - currentDelay = myMaxDelay; + return myUnit; + } + + @JsonProperty ("unit") + public void setUnit(final String unit) + { + if (unit != null && !unit.isBlank()) + { + this.myUnit = unit; + this.myInitialDelay = convertToMillis(TimeUnit.MILLISECONDS.toSeconds(this.myInitialDelay), unit); + this.myFixedDelay = convertToMillis(TimeUnit.MILLISECONDS.toSeconds(this.myFixedDelay), unit); + } + } - return currentDelay; } } diff --git a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetryBackoffStrategy.java b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetryBackoffStrategy.java index ba3427acb..ad22dcb4b 100644 --- a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetryBackoffStrategy.java +++ b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetryBackoffStrategy.java @@ -21,22 +21,27 @@ public final class RetryBackoffStrategy { private static final Logger LOG = LoggerFactory.getLogger(RetryBackoffStrategy.class); - private static final int MILLISECONDS_1000 = 1000; + private static final int ONE_SECOND_IN_MS = 1000; + private static final int RETRY_DELAY_MULTIPLIER = 2; private final RetryPolicyConfig myRetryPolicyConfig; + private final RetryPolicyConfig.RetrySchedule myRetrySchedule; + private final RetryPolicyConfig.RetryDelay myRetryDelay; public RetryBackoffStrategy(final RetryPolicyConfig retryPolicyConfig) { - this.myRetryPolicyConfig = retryPolicyConfig; + myRetryPolicyConfig = retryPolicyConfig; + myRetrySchedule = retryPolicyConfig.getRetrySchedule(); + myRetryDelay = retryPolicyConfig.getRetryDelay(); } public long getInitialDelay() { - return myRetryPolicyConfig.getInitialDelay(); + return myRetrySchedule.getInitialDelay(); } public long getFixedDelay() { - return myRetryPolicyConfig.getFixedDelay(); + return myRetrySchedule.getFixedDelay(); } public int getMaxAttempts() @@ -46,10 +51,10 @@ public int getMaxAttempts() public long calculateDelay(final int attempt) { - long baseDelay = myRetryPolicyConfig.getDelay(); - long calculatedDelay = baseDelay * (attempt * 2L); + long baseDelay = myRetryDelay.getStartDelay(); + long calculatedDelay = baseDelay * ((long) attempt * RETRY_DELAY_MULTIPLIER); LOG.debug("Calculated delay for attempt {}: {} ms", attempt, calculatedDelay); - return Math.min(calculatedDelay, myRetryPolicyConfig.getMaxDelay() * MILLISECONDS_1000); + return Math.min(calculatedDelay, myRetryDelay.getMaxDelay() * ONE_SECOND_IN_MS); } public void sleepBeforeNextRetry(final long delayMillis) diff --git a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerService.java b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerService.java index 4fe510e9d..5be819943 100644 --- a/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerService.java +++ b/application/src/main/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerService.java @@ -90,7 +90,7 @@ public void startScheduler() long initialDelay = retryBackoffStrategy.getInitialDelay(); long fixedDelay = retryBackoffStrategy.getFixedDelay(); - LOG.info("Starting RetrySchedulerService with initialDelay={} ms and fixedDelay={} ms", initialDelay, fixedDelay); + LOG.debug("Starting RetrySchedulerService with initialDelay={} ms and fixedDelay={} ms", initialDelay, fixedDelay); myScheduler.scheduleWithFixedDelay(this::retryNodes, initialDelay, fixedDelay, TimeUnit.MILLISECONDS); } @@ -98,12 +98,11 @@ public void startScheduler() @VisibleForTesting void retryNodes() { - LOG.debug("Retrying unavailable nodes"); + LOG.warn("Retrying unavailable nodes"); List unavailableNodes = findUnavailableNodes(); if (unavailableNodes.isEmpty()) { - LOG.info("No unavailable nodes found."); return; } @@ -149,7 +148,7 @@ private void retryConnectionForNode(final Node node) private boolean tryReconnectToNode(final Node node, final UUID nodeId, final int attempt) { long delayMillis = retryBackoffStrategy.calculateDelay(attempt); - LOG.info("Attempting to reconnect to node: {}, attempt: {}", nodeId, attempt); + LOG.warn("Attempting to reconnect to node: {}, attempt: {}", nodeId, attempt); if (establishConnectionToNode(node)) { diff --git a/application/src/main/resources/ecc.yml b/application/src/main/resources/ecc.yml index 378041bd9..b6f0c2673 100644 --- a/application/src/main/resources/ecc.yml +++ b/application/src/main/resources/ecc.yml @@ -99,20 +99,26 @@ connection: ## Delay use to wait between an attempt and another, this value will be multiplied by the current attempt count powered by two. ## If the current attempt is 4 and the default delay is 5 seconds, so ((4(attempt) x 2) x 5(default delay)) = 40 seconds. ## If the calculated delay is greater than maxDelay, maxDelay will be used instead of the calculated delay. - delay: 5 - ## Maximum delay before the next connection attempt is made. - ## Setting it as 0 will disable maxDelay and the delay interval will - ## be calculated based on the attempt count and the default delay. - maxDelay: 30 - unit: seconds - # Initial delay before the RetrySchedulerService starts after the application launches. - # This is in seconds and represents the wait time before the service first runs - initialDelay: 86400 - # Fixed delay between subsequent executions of the RetrySchedulerService. - # This value represents the delay time (in seconds) between when the service completes one execution - # and the time it will be triggered again for another execution. - # During each execution, the service will check for unavailable nodes and attempt reconnections as per the retry logic. - fixedDelay: 86400 + delay: + start: 5 + ## Maximum delay before the next connection attempt is made. + ## Setting it as 0 will disable maxDelay and the delay interval will + ## be calculated based on the attempt count and the default delay. + max: 30 + ## unit can be milliseconds, seconds, minutes, hours, days. + unit: seconds + # RetrySchedulerService schedule starts after the application launches. + retrySchedule: + ## Initial delay before the RetrySchedulerService starts after the application launches. + ## By default, this service would trigger after 1 day and represents the wait time before the service first runs + initialDelay: 1 + ## Fixed delay between subsequent executions of the RetrySchedulerService. + ## This value represents the delay time (by default 1 day) between when the service completes one execution + ## and the time it will be triggered again for another execution. + ## During each execution, the service will check for unavailable nodes and attempt reconnections as per the retry logic. + fixedDelay: 1 + ## unit can be milliseconds, seconds, minutes, hours, days. + unit: days rest_server: ## diff --git a/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/config/TestConfig.java b/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/config/TestConfig.java index dfc469d18..49f23a8e7 100644 --- a/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/config/TestConfig.java +++ b/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/config/TestConfig.java @@ -31,12 +31,15 @@ import java.io.IOException; import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertThrows; public class TestConfig { private static final String DEFAULT_AGENT_FILE_NAME = "all_set.yml"; + private static final String NOTHING_SET_AGENT_FILE_NAME = "nothing_set.yml"; + private static final String TIME_UNIT_IN_SECOND = "seconds"; private static Config config; private static DistributedNativeConnection nativeConnection; private static DistributedJmxConnection distributedJmxConnection; @@ -177,10 +180,59 @@ public void testRetryPolicyConfig() RetryPolicyConfig retryPolicyConfig = distributedJmxConnection.getRetryPolicyConfig(); assertNotNull(retryPolicyConfig); assertThat(5).isEqualTo(retryPolicyConfig.getMaxAttempts()); - assertThat(5000).isEqualTo(retryPolicyConfig.getDelay()); - assertThat(30000).isEqualTo(retryPolicyConfig.getMaxDelay()); - assertThat("seconds").isEqualTo(retryPolicyConfig.getUnit()); - assertThat(86400000).isEqualTo(retryPolicyConfig.getInitialDelay()); - assertThat(86400000).isEqualTo(retryPolicyConfig.getFixedDelay()); + assertThat(5000).isEqualTo(retryPolicyConfig.getRetryDelay().getStartDelay()); + assertThat(30000).isEqualTo(retryPolicyConfig.getRetryDelay().getMaxDelay()); + assertThat(TIME_UNIT_IN_SECOND).isEqualTo(retryPolicyConfig.getRetryDelay().getUnit()); + assertThat(86400000).isEqualTo(retryPolicyConfig.getRetrySchedule().getInitialDelay()); + assertThat(86400000).isEqualTo(retryPolicyConfig.getRetrySchedule().getFixedDelay()); + assertThat(TIME_UNIT_IN_SECOND).isEqualTo(retryPolicyConfig.getRetrySchedule().getUnit()); + } + + @Test + public void testRetryPolicyConfigWhenNothingSet() throws IOException + { + ClassLoader classLoader = Thread.currentThread().getContextClassLoader(); + File file = new File(classLoader.getResource(NOTHING_SET_AGENT_FILE_NAME).getFile()); + ObjectMapper objectMapper = new ObjectMapper(new YAMLFactory()); + Config config = objectMapper.readValue(file, Config.class); + + ConnectionConfig connection = config.getConnectionConfig(); + distributedJmxConnection = connection.getJmxConnection(); + Class providerClass = distributedJmxConnection.getProviderClass(); + assertThat(providerClass).isEqualTo(AgentJmxConnectionProvider.class); + RetryPolicyConfig retryPolicyConfig = distributedJmxConnection.getRetryPolicyConfig(); + assertNotNull(retryPolicyConfig); + assertThat(5).isEqualTo(retryPolicyConfig.getMaxAttempts()); + assertThat(5000).isEqualTo(retryPolicyConfig.getRetryDelay().getStartDelay()); + assertThat(30000).isEqualTo(retryPolicyConfig.getRetryDelay().getMaxDelay()); + assertThat(TIME_UNIT_IN_SECOND).isEqualTo(retryPolicyConfig.getRetryDelay().getUnit()); + assertThat(86400000).isEqualTo(retryPolicyConfig.getRetrySchedule().getInitialDelay()); + assertThat(86400000).isEqualTo(retryPolicyConfig.getRetrySchedule().getFixedDelay()); + assertThat(TIME_UNIT_IN_SECOND).isEqualTo(retryPolicyConfig.getRetrySchedule().getUnit()); + } + + @Test + public void testStartDelayGreaterThanMaxDelayThrowsException() + { + RetryPolicyConfig.RetryDelay retryDelay = new RetryPolicyConfig.RetryDelay(); + IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> + { + retryDelay.setMaxDelay(1000L); + retryDelay.setStartDelay(2000L); + }); + assertEquals("Start delay cannot be greater than max delay.", exception.getMessage()); + } + + @Test + public void testMaxDelayLessThanStartDelayThrowsException() + { + RetryPolicyConfig.RetryDelay retryDelay = new RetryPolicyConfig.RetryDelay(); + IllegalArgumentException exception = assertThrows(IllegalArgumentException.class, () -> + { + retryDelay.setMaxDelay(3000L); + retryDelay.setStartDelay(2000L); + retryDelay.setMaxDelay(1000L); + }); + assertEquals("Max delay cannot be less than start delay.", exception.getMessage()); } } diff --git a/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerServiceTest.java b/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerServiceTest.java index d72e06029..ffaceddef 100644 --- a/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerServiceTest.java +++ b/application/src/test/java/com/ericsson/bss/cassandra/ecchronos/application/spring/RetrySchedulerServiceTest.java @@ -50,6 +50,10 @@ class RetrySchedulerServiceTest private DistributedNativeConnectionProvider nativeConnectionProvider; @Mock private RetryPolicyConfig retryPolicyConfig; + @Mock + private RetryPolicyConfig.RetryDelay retryDelay; + @Mock + private RetryPolicyConfig.RetrySchedule retrySchedule; private RetrySchedulerService retrySchedulerService; @BeforeEach @@ -63,14 +67,16 @@ void setUp() when(config.getConnectionConfig()).thenReturn(connectionConfig); when(connectionConfig.getJmxConnection()).thenReturn(jmxConnection); + when(retryDelay.getStartDelay()).thenReturn(500L); + when(retryDelay.getMaxDelay()).thenReturn(5000L); when(jmxConnection.getRetryPolicyConfig()).thenReturn(retryPolicyConfig); // Mock behavior for retryPolicyConfig - when(retryPolicyConfig.getInitialDelay()).thenReturn(1000L); - when(retryPolicyConfig.getFixedDelay()).thenReturn(1000L); + when(retrySchedule.getInitialDelay()).thenReturn(1000L); + when(retrySchedule.getFixedDelay()).thenReturn(1000L); when(retryPolicyConfig.getMaxAttempts()).thenReturn(3); - when(retryPolicyConfig.getDelay()).thenReturn(500L); - when(retryPolicyConfig.getMaxDelay()).thenReturn(5000L); + when(retryPolicyConfig.getRetryDelay()).thenReturn(retryDelay); + when(retryPolicyConfig.getRetrySchedule()).thenReturn(retrySchedule); // Initialize RetrySchedulerService with new RetryBackoffStrategy retrySchedulerService = new RetrySchedulerService(eccNodesSync, config, jmxConnectionProvider, nativeConnectionProvider); @@ -82,8 +88,8 @@ void testSchedulerStart() // Call the method under test retrySchedulerService.startScheduler(); // Verify that the scheduler starts correctly with the correct initialDelay and fixedDelay - verify(retryPolicyConfig, times(1)).getInitialDelay(); - verify(retryPolicyConfig, times(1)).getFixedDelay(); + verify(retrySchedule, times(1)).getInitialDelay(); + verify(retrySchedule, times(1)).getFixedDelay(); } @Test diff --git a/application/src/test/resources/all_set.yml b/application/src/test/resources/all_set.yml index 6a0aa5fbc..53917e31a 100644 --- a/application/src/test/resources/all_set.yml +++ b/application/src/test/resources/all_set.yml @@ -46,11 +46,14 @@ connection: provider: com.ericsson.bss.cassandra.ecchronos.application.providers.AgentJmxConnectionProvider retryPolicy: maxAttempts: 5 - delay: 5 - maxDelay: 30 - unit: seconds - initialDelay: 86400 - fixedDelay: 86400 + delay: + start: 5 + max: 30 + unit: seconds + retrySchedule: + initialDelay: 86400 + fixedDelay: 86400 + unit: seconds rest_server: host: 127.0.0.2 diff --git a/application/src/test/resources/nothing_set.yml b/application/src/test/resources/nothing_set.yml new file mode 100644 index 000000000..65767b5b8 --- /dev/null +++ b/application/src/test/resources/nothing_set.yml @@ -0,0 +1,29 @@ +# +# Copyright 2024 Telefonaktiebolaget LM Ericsson +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +connection: + cql: + jmx: + provider: com.ericsson.bss.cassandra.ecchronos.application.providers.AgentJmxConnectionProvider + retryPolicy: + maxAttempts: + delay: + start: + max: + unit: + retrySchedule: + initialDelay: + fixedDelay: + unit: \ No newline at end of file