Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Modernize sal-akka-raft tests
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
RaftActorTestKit.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTestKit.java
b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTestKit.java
index 6386d6c6ba1e7a9453161c3f67caa146e1dcd543..7d6b8988d32dbd076f5d87826e4984e0148b857a 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTestKit.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTestKit.java
@@
-7,6
+7,8
@@
*/
package org.opendaylight.controller.cluster.raft;
*/
package org.opendaylight.controller.cluster.raft;
+import static org.junit.Assert.fail;
+
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.pattern.Patterns;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.pattern.Patterns;
@@
-16,7
+18,6
@@
import akka.util.Timeout;
import com.google.common.util.concurrent.Uninterruptibles;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
import com.google.common.util.concurrent.Uninterruptibles;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
-import org.junit.Assert;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeader;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeaderReply;
import org.slf4j.Logger;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeader;
import org.opendaylight.controller.cluster.raft.client.messages.FindLeaderReply;
import org.slf4j.Logger;
@@
-31,7
+32,7
@@
public class RaftActorTestKit extends TestKit {
public RaftActorTestKit(final ActorSystem actorSystem, final String actorName) {
super(actorSystem);
public RaftActorTestKit(final ActorSystem actorSystem, final String actorName) {
super(actorSystem);
- raftActor =
this.
getSystem().actorOf(MockRaftActor.builder().id(actorName).props(), actorName);
+ raftActor = getSystem().actorOf(MockRaftActor.builder().id(actorName).props(), actorName);
}
public ActorRef getRaftActor() {
}
public ActorRef getRaftActor() {
@@
-65,6
+66,6
@@
public class RaftActorTestKit extends TestKit {
Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
}
Uninterruptibles.sleepUninterruptibly(50, TimeUnit.MILLISECONDS);
}
-
Assert.
fail("Leader not found for actorRef " + actorRef.path());
+ fail("Leader not found for actorRef " + actorRef.path());
}
}
}
}