From: Robert Varga Date: Mon, 14 Aug 2017 20:53:15 +0000 (+0200) Subject: Make testTransactionForwardedToLeaderAfterRetry purge-aware X-Git-Tag: release/oxygen~139 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=ea802a376bce43e316fee94eff689ee8bb817b35 Make testTransactionForwardedToLeaderAfterRetry purge-aware At the point where we are waiting for transaction replication to fully propagate, we need to account for the purge request, as otherwise the configuration could interfere with index sequencing. Change-Id: I13f93e306e5b77304916e4c05f39dc28fb9cc049 Signed-off-by: Robert Varga (cherry picked from commit d1de9c55e280fc6a972b0cd408189057446c45a0) --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java index 04370fe087..a82ebb7d2f 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java @@ -786,10 +786,10 @@ public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest { // Wait for the commit to be replicated to the follower. MemberNode.verifyRaftState(followerDistributedDataStore, "cars", - raftState -> assertEquals("getLastApplied", 0, raftState.getLastApplied())); + raftState -> assertEquals("getLastApplied", 1, raftState.getLastApplied())); MemberNode.verifyRaftState(followerDistributedDataStore, "people", - raftState -> assertEquals("getLastApplied", 0, raftState.getLastApplied())); + raftState -> assertEquals("getLastApplied", 1, raftState.getLastApplied())); // Prepare, ready and canCommit a WO tx that writes to 2 shards. This will become the current tx in // the leader shard.