Make testTransactionForwardedToLeaderAfterRetry purge-aware 43/61743/1
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 14 Aug 2017 20:53:15 +0000 (22:53 +0200)
committerThanh Ha <thanh.ha@linuxfoundation.org>
Tue, 15 Aug 2017 04:58:26 +0000 (04:58 +0000)
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 <robert.varga@pantheon.tech>
(cherry picked from commit d1de9c55e280fc6a972b0cd408189057446c45a0)

opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java

index 04370fe0876a0be664d26da7bd4c00ab6f9ae382..a82ebb7d2f972ff7093e551bdf612a712897e2b0 100644 (file)
@@ -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.