writeCarsNodeAndVerify(newReplicaNode3.operDataStore(), newReplicaNode2.operDataStore());
// Verify all data has been replicated. We expect 4 log entries and thus last applied index of 3 -
- // 2 ServerConfigurationPayload entries, the transaction payload entry plus a purge payload.
+ // 2 ServerConfigurationPayload entries, the transaction payload entry plus a purge payload.
RaftStateVerifier verifier = raftState -> {
- assertEquals("Commit index", 4, raftState.getCommitIndex());
- assertEquals("Last applied index", 4, raftState.getLastApplied());
+ assertEquals("Commit index", 3, raftState.getCommitIndex());
+ assertEquals("Last applied index", 3, raftState.getLastApplied());
};
verifyRaftState(leaderNode1.configDataStore(), "cars", verifier);
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.opendaylight.controller.cluster.access.concepts.MemberName;
+import org.opendaylight.controller.cluster.databroker.ClientBackedDataStore;
import org.opendaylight.controller.cluster.datastore.identifiers.ShardIdentifier;
import org.opendaylight.controller.cluster.datastore.utils.ActorUtils;
import org.opendaylight.controller.cluster.raft.client.messages.GetOnDemandRaftState;
}
try {
- IntegrationTestKit.shutdownActorSystem(kit.getSystem(), Boolean.TRUE);
+ IntegrationTestKit.shutdownActorSystem(kit.getSystem(), true);
} catch (RuntimeException e) {
LoggerFactory.getLogger(MemberNode.class).warn("Failed to shutdown actor system", e);
}
* @return this Builder
*/
public Builder moduleShardsConfig(final String newModuleShardsConfig) {
- this.moduleShardsConfig = newModuleShardsConfig;
+ moduleShardsConfig = newModuleShardsConfig;
return this;
}
* @return this Builder
*/
public Builder akkaConfig(final String newAkkaConfig) {
- this.akkaConfig = newAkkaConfig;
+ akkaConfig = newAkkaConfig;
return this;
}
* @return this Builder
*/
public Builder useAkkaArtery(final boolean newUseAkkaArtery) {
- this.useAkkaArtery = newUseAkkaArtery;
+ useAkkaArtery = newUseAkkaArtery;
return this;
}
* @return this Builder
*/
public Builder testName(final String newTestName) {
- this.testName = newTestName;
+ testName = newTestName;
return this;
}
* @return this Builder
*/
public Builder waitForShardLeader(final String... shardNames) {
- this.waitForshardLeader = shardNames;
+ waitForshardLeader = shardNames;
return this;
}
* @return this Builder
*/
public Builder createOperDatastore(final boolean value) {
- this.createOperDatastore = value;
+ createOperDatastore = value;
return this;
}
* @return this Builder
*/
public Builder schemaContext(final EffectiveModelContext newSchemaContext) {
- this.schemaContext = newSchemaContext;
+ schemaContext = newSchemaContext;
return this;
}
String memberName = new ClusterWrapperImpl(system).getCurrentMemberName().getName();
node.kit.getDatastoreContextBuilder().shardManagerPersistenceId("shard-manager-config-" + memberName);
- node.configDataStore = node.kit.setupAbstractDataStore(DistributedDataStore.class,
+ node.configDataStore = node.kit.setupAbstractDataStore(ClientBackedDataStore.class,
"config_" + testName, moduleShardsConfig, true, schemaContext, waitForshardLeader);
if (createOperDatastore) {
node.kit.getDatastoreContextBuilder().shardManagerPersistenceId("shard-manager-oper-" + memberName);
- node.operDataStore = node.kit.setupAbstractDataStore(DistributedDataStore.class,
+ node.operDataStore = node.kit.setupAbstractDataStore(ClientBackedDataStore.class,
"oper_" + testName, moduleShardsConfig, true, schemaContext, waitForshardLeader);
}