Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Reduce use of scala.concurrent.duration.Duration
[controller.git]
/
opendaylight
/
md-sal
/
sal-akka-raft
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
raft
/
behaviors
/
AbstractLeaderElectionScenarioTest.java
diff --git
a/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeaderElectionScenarioTest.java
b/opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeaderElectionScenarioTest.java
index f3d1aac03050200a2cb70057126676d49ad6a092..8f0cc998030b66b2d19157da6df197812f240a3f 100644
(file)
--- a/
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeaderElectionScenarioTest.java
+++ b/
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/behaviors/AbstractLeaderElectionScenarioTest.java
@@
-40,7
+40,6
@@
import org.opendaylight.controller.cluster.raft.utils.MessageCollectorActor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.concurrent.Await;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import scala.concurrent.Await;
-import scala.concurrent.duration.Duration;
import scala.concurrent.duration.FiniteDuration;
/**
import scala.concurrent.duration.FiniteDuration;
/**
@@
-226,7
+225,7
@@
public class AbstractLeaderElectionScenarioTest {
}
@After
}
@After
- public void tearDown()
throws Exception
{
+ public void tearDown() {
TestKit.shutdownActorSystem(system);
}
TestKit.shutdownActorSystem(system);
}
@@
-251,7
+250,7
@@
public class AbstractLeaderElectionScenarioTest {
RaftState actualState;
try {
actualState = (RaftState) Await.result(Patterns.ask(actor.self(), GetBehaviorState.INSTANCE,
RaftState actualState;
try {
actualState = (RaftState) Await.result(Patterns.ask(actor.self(), GetBehaviorState.INSTANCE,
- Timeout.apply(5, TimeUnit.SECONDS)),
Duration.apply
(5, TimeUnit.SECONDS));
+ Timeout.apply(5, TimeUnit.SECONDS)),
FiniteDuration.create
(5, TimeUnit.SECONDS));
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {
} catch (RuntimeException e) {
throw e;
} catch (Exception e) {