private final Builder leaderDatastoreContextBuilder =
- DatastoreContext.newBuilder().shardHeartbeatIntervalInMillis(100).shardElectionTimeoutFactor(5)
- .logicalStoreType(
- org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION);
+ DatastoreContext.newBuilder().shardHeartbeatIntervalInMillis(100).shardElectionTimeoutFactor(5);
private final DatastoreContext.Builder followerDatastoreContextBuilder =
- DatastoreContext.newBuilder().shardHeartbeatIntervalInMillis(100).shardElectionTimeoutFactor(5)
- .logicalStoreType(
- org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType.CONFIGURATION);
+ DatastoreContext.newBuilder().shardHeartbeatIntervalInMillis(100).shardElectionTimeoutFactor(5);
private DistributedDataStore leaderConfigDatastore;
private DistributedDataStore leaderOperDatastore;
followerOperDatastore.close();
}
- JavaTestKit.shutdownActorSystem(leaderSystem);
- JavaTestKit.shutdownActorSystem(followerSystem);
+ JavaTestKit.shutdownActorSystem(leaderSystem, null, Boolean.TRUE);
+ JavaTestKit.shutdownActorSystem(followerSystem, null, Boolean.TRUE);
InMemoryJournal.clear();
InMemorySnapshotStore.clear();
}
- private void initEmptyDatastores() {
+ private void initEmptyDatastores() throws Exception {
leaderTestKit = new IntegrationTestKit(leaderSystem, leaderDatastoreContextBuilder);
- leaderConfigDatastore = (DistributedDataStore) leaderTestKit.setupDistributedDataStore(
+ leaderConfigDatastore = leaderTestKit.setupDistributedDataStore(
"config", MODULE_SHARDS_CONFIG, true,
SchemaContextHelper.distributedShardedDOMDataTreeSchemaContext());
- leaderOperDatastore = (DistributedDataStore) leaderTestKit.setupDistributedDataStore(
+ leaderOperDatastore = leaderTestKit.setupDistributedDataStore(
"operational", MODULE_SHARDS_CONFIG, true,
SchemaContextHelper.distributedShardedDOMDataTreeSchemaContext());
followerTestKit = new IntegrationTestKit(followerSystem, followerDatastoreContextBuilder);
- followerConfigDatastore = (DistributedDataStore) followerTestKit.setupDistributedDataStore(
+ followerConfigDatastore = followerTestKit.setupDistributedDataStore(
"config", MODULE_SHARDS_CONFIG, true, SchemaContextHelper.distributedShardedDOMDataTreeSchemaContext());
- followerOperDatastore = (DistributedDataStore) followerTestKit.setupDistributedDataStore(
+ followerOperDatastore = followerTestKit.setupDistributedDataStore(
"operational", MODULE_SHARDS_CONFIG, true,
SchemaContextHelper.distributedShardedDOMDataTreeSchemaContext());
followerOperDatastore,
followerConfigDatastore);
+ followerTestKit.waitForMembersUp("member-1");
+
leaderShardFactory.init();
followerShardFactory.init();