Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Fix checkstyle problems not detected by the current version
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
SimpleShardDataTreeCohortTest.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java
b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java
index 7d2500b7168249685752f68505697e1662ed5c35..1e0153743115259f817b211591b1441420bf32a8 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/SimpleShardDataTreeCohortTest.java
@@
-62,7
+62,7
@@
public class SimpleShardDataTreeCohortTest extends AbstractTest {
doNothing().when(mockUserCohorts).commit();
doReturn(Optional.empty()).when(mockUserCohorts).abort();
doNothing().when(mockUserCohorts).commit();
doReturn(Optional.empty()).when(mockUserCohorts).abort();
- cohort = new SimpleShardDataTreeCohort(mockShardDataTree, mockModification, nextTransactionId(),
+ cohort = new SimpleShardDataTreeCohort
.Normal
(mockShardDataTree, mockModification, nextTransactionId(),
mockUserCohorts);
}
mockUserCohorts);
}
@@
-230,7
+230,7
@@
public class SimpleShardDataTreeCohortTest extends AbstractTest {
@Test
public void testAbort() throws Exception {
@Test
public void testAbort() throws Exception {
- do
Nothing(
).when(mockShardDataTree).startAbort(cohort);
+ do
Return(Boolean.TRUE
).when(mockShardDataTree).startAbort(cohort);
abort(cohort).get();
verify(mockShardDataTree).startAbort(cohort);
abort(cohort).get();
verify(mockShardDataTree).startAbort(cohort);
@@
-238,10
+238,10
@@
public class SimpleShardDataTreeCohortTest extends AbstractTest {
@Test
public void testAbortWithCohorts() throws Exception {
@Test
public void testAbortWithCohorts() throws Exception {
- do
Nothing(
).when(mockShardDataTree).startAbort(cohort);
+ do
Return(true
).when(mockShardDataTree).startAbort(cohort);
final Promise<Iterable<Object>> cohortFuture = akka.dispatch.Futures.promise();
final Promise<Iterable<Object>> cohortFuture = akka.dispatch.Futures.promise();
- doReturn(Optional.of(
cohortFuture.future(
))).when(mockUserCohorts).abort();
+ doReturn(Optional.of(
Collections.singletonList(cohortFuture.future()
))).when(mockUserCohorts).abort();
final Future<?> abortFuture = abort(cohort);
final Future<?> abortFuture = abort(cohort);