sal-akka-raft: use lambdas
[controller.git] / opendaylight / md-sal / sal-akka-raft / src / test / java / org / opendaylight / controller / cluster / raft / IsolationScenarioTest.java
index 1d7e317..fb810e3 100644 (file)
@@ -160,15 +160,13 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest {
         // Wait for the isolated leader to send AppendEntries to the followers with the new entry with index 1. This
         // message is forwarded to the followers.
 
-        expectFirstMatching(follower1CollectorActor, AppendEntries.class, ae -> {
-            return ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
-                    && ae.getEntries().get(0).getData().equals(payload1);
-        });
+        expectFirstMatching(follower1CollectorActor, AppendEntries.class, ae ->
+                ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
+                        && ae.getEntries().get(0).getData().equals(payload1));
 
-        expectFirstMatching(follower2CollectorActor, AppendEntries.class, ae -> {
-            return ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
-                    && ae.getEntries().get(0).getData().equals(payload1);
-        });
+        expectFirstMatching(follower2CollectorActor, AppendEntries.class, ae ->
+                ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
+                        && ae.getEntries().get(0).getData().equals(payload1));
 
         verifyApplyJournalEntries(leaderCollectorActor, 1);
 
@@ -283,15 +281,13 @@ public class IsolationScenarioTest extends AbstractRaftActorIntegrationTest {
         // Wait for the isolated leader to send AppendEntries to the followers with the new entry with index 1. This
         // message is forwarded to the followers.
 
-        expectFirstMatching(follower1CollectorActor, AppendEntries.class, ae -> {
-            return ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
-                    && ae.getEntries().get(0).getData().equals(payload1);
-        });
+        expectFirstMatching(follower1CollectorActor, AppendEntries.class, ae ->
+                ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
+                        && ae.getEntries().get(0).getData().equals(payload1));
 
-        expectFirstMatching(follower2CollectorActor, AppendEntries.class, ae -> {
-            return ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
-                    && ae.getEntries().get(0).getData().equals(payload1);
-        });
+        expectFirstMatching(follower2CollectorActor, AppendEntries.class, ae ->
+                ae.getEntries().size() == 1 && ae.getEntries().get(0).getIndex() == 1
+                        && ae.getEntries().get(0).getData().equals(payload1));
 
         verifyApplyJournalEntries(leaderCollectorActor, 1);
 

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.