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%2FShardTest.java;h=9fd33b217d9825e02bc4dbb1cc83edbc286afbfe;hp=51063c8d2cc5fe6b2f9e2eb8b4a16d7ed62e30b3;hb=561058be77594a026abbdbe82616fc65c7f58f48;hpb=892a6ca966046fd790bdf8a64dccb456a3ece8b4 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java index 51063c8d2c..9fd33b217d 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java @@ -977,8 +977,12 @@ public class ShardTest extends AbstractShardTest { } @Test - public void testReadyWithImmediateCommit() throws Exception{ + public void testReadyWithReadWriteImmediateCommit() throws Exception{ testReadyWithImmediateCommit(true); + } + + @Test + public void testReadyWithWriteOnlyImmediateCommit() throws Exception{ testReadyWithImmediateCommit(false); } @@ -1089,9 +1093,13 @@ public class ShardTest extends AbstractShardTest { } @Test - public void testCommitWithPersistenceDisabled() throws Throwable { + public void testReadWriteCommitWithPersistenceDisabled() throws Throwable { + testCommitWithPersistenceDisabled(true); + } + + @Test + public void testWriteOnlyCommitWithPersistenceDisabled() throws Throwable { testCommitWithPersistenceDisabled(true); - testCommitWithPersistenceDisabled(false); } private void testCommitWithPersistenceDisabled(final boolean readWrite) throws Throwable { @@ -1141,8 +1149,12 @@ public class ShardTest extends AbstractShardTest { } @Test - public void testCommitWhenTransactionHasNoModifications() { + public void testReadWriteCommitWhenTransactionHasNoModifications() { testCommitWhenTransactionHasNoModifications(true); + } + + @Test + public void testWriteOnlyCommitWhenTransactionHasNoModifications() { testCommitWhenTransactionHasNoModifications(false); } @@ -1199,8 +1211,12 @@ public class ShardTest extends AbstractShardTest { } @Test - public void testCommitWhenTransactionHasModifications() { + public void testReadWriteCommitWhenTransactionHasModifications() { testCommitWhenTransactionHasModifications(true); + } + + @Test + public void testWriteOnlyCommitWhenTransactionHasModifications() { testCommitWhenTransactionHasModifications(false); } @@ -2338,7 +2354,7 @@ public class ShardTest extends AbstractShardTest { "akka://test/user/" + followerShardID.toString())).schemaContext(SCHEMA_CONTEXT).props(). withDispatcher(Dispatchers.DefaultDispatcherId()), leaderShardID.toString()); - leaderShard.tell(new ElectionTimeout(), ActorRef.noSender()); + leaderShard.tell(ElectionTimeout.INSTANCE, ActorRef.noSender()); String leaderPath = waitUntilLeader(followerShard); assertEquals("Shard leader path", leaderShard.path().toString(), leaderPath); @@ -2414,7 +2430,7 @@ public class ShardTest extends AbstractShardTest { "akka://test/user/" + followerShardID.toString())).schemaContext(SCHEMA_CONTEXT).props(). withDispatcher(Dispatchers.DefaultDispatcherId()), leaderShardID.toString()); - leaderShard.tell(new ElectionTimeout(), ActorRef.noSender()); + leaderShard.tell(ElectionTimeout.INSTANCE, ActorRef.noSender()); String leaderPath = waitUntilLeader(followerShard); assertEquals("Shard leader path", leaderShard.path().toString(), leaderPath);