X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FDatastoreContextIntrospectorTest.java;h=aab9322e9a89ea2a14da21298790325799b108a6;hp=ba62f8dba15312762905318735c053701b8ef8f2;hb=7cb260aeb0738104e3bee8a086de9e2e5f77b7e0;hpb=66e956cbf397a86f1a512396feb7cb87ea602f92 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java index ba62f8dba1..aab9322e9a 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DatastoreContextIntrospectorTest.java @@ -13,6 +13,7 @@ import static org.junit.Assert.assertTrue; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_HEARTBEAT_INTERVAL_IN_MILLIS; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_OPERATION_TIMEOUT_IN_MS; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_SHARD_INITIALIZATION_TIMEOUT; +import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD_PERCENTAGE; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_SHARD_TRANSACTION_IDLE_TIMEOUT; import static org.opendaylight.controller.cluster.datastore.DatastoreContext.DEFAULT_SHARD_TX_COMMIT_TIMEOUT_IN_SECONDS; @@ -65,6 +66,7 @@ public class DatastoreContextIntrospectorTest { properties.put("recovery-snapshot-interval-seconds", "360"); properties.put("shard-isolated-leader-check-interval-in-millis", "123"); properties.put("shard-snapshot-data-threshold-percentage", "100"); + properties.put("shard-snapshot-data-threshold", "800"); properties.put("shard-election-timeout-factor", "21"); properties.put("shard-batched-modification-count", "901"); properties.put("transactionCreationInitialRateLimit", "200"); @@ -92,6 +94,7 @@ public class DatastoreContextIntrospectorTest { assertEquals(360, context.getShardRaftConfig().getRecoverySnapshotIntervalSeconds()); assertEquals(123, context.getShardRaftConfig().getIsolatedCheckIntervalInMillis()); assertEquals(100, context.getShardRaftConfig().getSnapshotDataThresholdPercentage()); + assertEquals(800, context.getShardRaftConfig().getSnapshotDataThreshold()); assertEquals(21, context.getShardRaftConfig().getElectionTimeoutFactor()); assertEquals(901, context.getShardBatchedModificationCount()); assertEquals(200, context.getTransactionCreationInitialRateLimit()); @@ -123,6 +126,7 @@ public class DatastoreContextIntrospectorTest { assertEquals(6, context.getInitialSettleTimeoutMultiplier()); assertEquals(123, context.getShardRaftConfig().getIsolatedCheckIntervalInMillis()); assertEquals(100, context.getShardRaftConfig().getSnapshotDataThresholdPercentage()); + assertEquals(800, context.getShardRaftConfig().getSnapshotDataThreshold()); assertEquals(22, context.getShardRaftConfig().getElectionTimeoutFactor()); assertEquals(200, context.getTransactionCreationInitialRateLimit()); assertTrue(context.isPersistent()); @@ -148,6 +152,7 @@ public class DatastoreContextIntrospectorTest { properties.put("shard-heartbeat-interval-in-millis", "99"); // bad - must be >= 100 properties.put("shard-transaction-commit-queue-capacity", "567"); // good properties.put("shard-snapshot-data-threshold-percentage", "101"); // bad - must be 0-100 + properties.put("shard-snapshot-data-threshold", "-1"); // bad - must be > 0 properties.put("shard-initialization-timeout-in-seconds", "-1"); // bad - must be > 0 properties.put("max-shard-data-change-executor-pool-size", "bogus"); // bad - NaN properties.put("unknownProperty", "1"); // bad - invalid property name @@ -166,6 +171,7 @@ public class DatastoreContextIntrospectorTest { assertEquals(567, context.getShardTransactionCommitQueueCapacity()); assertEquals(DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD_PERCENTAGE, context.getShardRaftConfig().getSnapshotDataThresholdPercentage()); + assertEquals(DEFAULT_SHARD_SNAPSHOT_DATA_THRESHOLD, context.getShardRaftConfig().getSnapshotDataThreshold()); assertEquals(DEFAULT_SHARD_INITIALIZATION_TIMEOUT, context.getShardInitializationTimeout()); }