X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-clustering-commons%2Fsrc%2Ftest%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fnotifications%2FRoleChangeNotifierTest.java;h=63b3707e516957e40c6295283ce2797e4f8c672d;hp=c361963acacf2e1d4df872a0a25aba03cfb484ba;hb=refs%2Fchanges%2F39%2F74339%2F5;hpb=3564341bbc0a9b53c5a26becb3d03230125cba80 diff --git a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifierTest.java b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifierTest.java index c361963aca..63b3707e51 100644 --- a/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifierTest.java +++ b/opendaylight/md-sal/sal-clustering-commons/src/test/java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifierTest.java @@ -27,7 +27,7 @@ public class RoleChangeNotifierTest { private ActorRef notifier; @Before - public void setUp() throws Exception { + public void setUp() { system = ActorSystem.apply(); notifier = system.actorOf(RoleChangeNotifier.getProps(MEMBER_ID)); listeners = new ArrayList<>(LISTENER_COUNT); @@ -37,12 +37,12 @@ public class RoleChangeNotifierTest { } @After - public void tearDown() throws Exception { + public void tearDown() { TestKit.shutdownActorSystem(system); } @Test - public void testHandleReceiveRoleChange() throws Exception { + public void testHandleReceiveRoleChange() { registerListeners(); final RoleChanged msg = new RoleChanged(MEMBER_ID, "old", "new"); notifier.tell(msg, ActorRef.noSender()); @@ -50,7 +50,7 @@ public class RoleChangeNotifierTest { } @Test - public void testHandleReceiveLeaderStateChanged() throws Exception { + public void testHandleReceiveLeaderStateChanged() { registerListeners(); final LeaderStateChanged msg = new LeaderStateChanged(MEMBER_ID, "leader", (short) 0); notifier.tell(msg, ActorRef.noSender()); @@ -58,7 +58,7 @@ public class RoleChangeNotifierTest { } @Test - public void testHandleReceiveRegistrationAfterRoleChange() throws Exception { + public void testHandleReceiveRegistrationAfterRoleChange() { final RoleChanged roleChanged1 = new RoleChanged(MEMBER_ID, "old1", "new1"); final RoleChanged lastRoleChanged = new RoleChanged(MEMBER_ID, "old2", "new2"); notifier.tell(roleChanged1, ActorRef.noSender()); @@ -68,7 +68,7 @@ public class RoleChangeNotifierTest { } @Test - public void testHandleReceiveRegistrationAfterLeaderStateChange() throws Exception { + public void testHandleReceiveRegistrationAfterLeaderStateChange() { final LeaderStateChanged leaderStateChanged1 = new LeaderStateChanged(MEMBER_ID, "leader1", (short) 0); final LeaderStateChanged lastLeaderStateChanged = new LeaderStateChanged(MEMBER_ID, "leader2", (short) 1); notifier.tell(leaderStateChanged1, ActorRef.noSender());