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=6ea6dae2231451fc7d549c4d9880aa8d4ef85bdc;hp=d9d0b9bc8c7796b9a2c7c90ebced1e4136a15244;hb=2ea38dabb91b086e91b74573e0ec4a2834b152ab;hpb=d617f1570fb165d02e18785b8b1704df7f830087 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 d9d0b9bc8c..6ea6dae223 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 @@ -11,7 +11,6 @@ package org.opendaylight.controller.cluster.datastore; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; import static org.junit.Assert.assertSame; import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.doReturn; @@ -233,7 +232,7 @@ public class ShardTest extends AbstractShardTest { shard.tell(FindLeader.INSTANCE, getRef()); final FindLeaderReply findLeadeReply = expectMsgClass(duration("5 seconds"), FindLeaderReply.class); - assertNull("Expected the shard not to be the leader", findLeadeReply.getLeaderActor()); + assertFalse("Expected the shard not to be the leader", findLeadeReply.getLeaderActor().isPresent()); // Signal the onChangeListenerRegistered latch to tell the thread above to proceed // with the election process. @@ -332,7 +331,7 @@ public class ShardTest extends AbstractShardTest { shard.tell(FindLeader.INSTANCE, getRef()); final FindLeaderReply findLeadeReply = expectMsgClass(duration("5 seconds"), FindLeaderReply.class); - assertNull("Expected the shard not to be the leader", findLeadeReply.getLeaderActor()); + assertFalse("Expected the shard not to be the leader", findLeadeReply.getLeaderActor().isPresent()); writeToStore(shard, path, ImmutableNodes.containerNode(TestModel.TEST_QNAME));