Skip to content

Commit

Permalink
threshold for Snapshot only have to be positive;
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Maute <stefan.maute@bosch.io>
  • Loading branch information
Stefan Maute committed Jul 7, 2021
1 parent d97452d commit db75cf4
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/utils/config/src/test/resources/test.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ditto {

concierge {
caches {
ask-timeout = 0s
ask-timeout = 10s

id {
maximum-size = 80000
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public final class DefaultSnapshotConfig implements SnapshotConfig {

private DefaultSnapshotConfig(final ScopedConfig config) {
interval = config.getNonNegativeAndNonZeroDurationOrThrow(SnapshotConfigValue.INTERVAL);
threshold = config.getNonNegativeLongOrThrow((SnapshotConfigValue.THRESHOLD));
threshold = config.getPositiveLongOrThrow((SnapshotConfigValue.THRESHOLD));
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,6 @@ public void underTestReturnsValuesOfConfigFile() {
.isEqualTo(Duration.ofDays(100L));
softly.assertThat(underTest.getThreshold())
.as(SnapshotConfig.SnapshotConfigValue.THRESHOLD.getConfigPath())
.isEqualTo(1);
.isEqualTo(2);
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
snapshot {
interval = 100d
threshold = 1
threshold = 2
}

0 comments on commit db75cf4

Please sign in to comment.