Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Bump operation timeout to 500ms
[controller.git]
/
opendaylight
/
md-sal
/
sal-distributed-datastore
/
src
/
test
/
java
/
org
/
opendaylight
/
controller
/
cluster
/
datastore
/
DistributedDataStoreRemotingIntegrationTest.java
diff --git
a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java
b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java
index 4f0f9297c9e0c493cc4837548ecb86c2cc67ae67..6fd48c534127f2f7770e5aa5426d02b78494c0fb 100644
(file)
--- a/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java
+++ b/
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreRemotingIntegrationTest.java
@@
-25,7
+25,6
@@
import akka.cluster.Cluster;
import akka.dispatch.Futures;
import akka.pattern.Patterns;
import akka.testkit.javadsl.TestKit;
import akka.dispatch.Futures;
import akka.pattern.Patterns;
import akka.testkit.javadsl.TestKit;
-import com.google.common.base.Optional;
import com.google.common.base.Stopwatch;
import com.google.common.base.Supplier;
import com.google.common.base.Throwables;
import com.google.common.base.Stopwatch;
import com.google.common.base.Supplier;
import com.google.common.base.Throwables;
@@
-40,6
+39,7
@@
import java.util.Collection;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
import java.util.Collections;
import java.util.LinkedList;
import java.util.List;
+import java.util.Optional;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
@@
-636,8
+636,8
@@
public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
initDatastoresWithCars("testReadyLocalTransactionForwardedToLeader");
followerTestKit.waitUntilLeader(followerDistributedDataStore.getActorContext(), "cars");
initDatastoresWithCars("testReadyLocalTransactionForwardedToLeader");
followerTestKit.waitUntilLeader(followerDistributedDataStore.getActorContext(), "cars");
- final
Optional<ActorRef> carsFollowerShard = followerDistributedDataStore.getActorContext()
- .findLocalShard("cars");
+ final
com.google.common.base.Optional<ActorRef> carsFollowerShard =
+
followerDistributedDataStore.getActorContext()
.findLocalShard("cars");
assertEquals("Cars follower shard found", true, carsFollowerShard.isPresent());
final DataTree dataTree = new InMemoryDataTreeFactory().create(
assertEquals("Cars follower shard found", true, carsFollowerShard.isPresent());
final DataTree dataTree = new InMemoryDataTreeFactory().create(
@@
-704,8
+704,8
@@
public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
initDatastoresWithCars("testForwardedReadyTransactionForwardedToLeader");
followerTestKit.waitUntilLeader(followerDistributedDataStore.getActorContext(), "cars");
initDatastoresWithCars("testForwardedReadyTransactionForwardedToLeader");
followerTestKit.waitUntilLeader(followerDistributedDataStore.getActorContext(), "cars");
- final
Optional<ActorRef> carsFollowerShard = followerDistributedDataStore.getActorContext()
- .findLocalShard("cars");
+ final
com.google.common.base.Optional<ActorRef> carsFollowerShard =
+
followerDistributedDataStore.getActorContext()
.findLocalShard("cars");
assertEquals("Cars follower shard found", true, carsFollowerShard.isPresent());
carsFollowerShard.get().tell(GetShardDataTree.INSTANCE, followerTestKit.getRef());
assertEquals("Cars follower shard found", true, carsFollowerShard.isPresent());
carsFollowerShard.get().tell(GetShardDataTree.INSTANCE, followerTestKit.getRef());
@@
-890,7
+890,7
@@
public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
initDatastores(testName, MODULE_SHARDS_CARS_PEOPLE_1_2_3, CARS_AND_PEOPLE);
final IntegrationTestKit follower2TestKit = new IntegrationTestKit(follower2System,
initDatastores(testName, MODULE_SHARDS_CARS_PEOPLE_1_2_3, CARS_AND_PEOPLE);
final IntegrationTestKit follower2TestKit = new IntegrationTestKit(follower2System,
- DatastoreContext.newBuilderFrom(followerDatastoreContextBuilder.build()).operationTimeoutInMillis(
1
00),
+ DatastoreContext.newBuilderFrom(followerDatastoreContextBuilder.build()).operationTimeoutInMillis(
5
00),
commitTimeout);
try (AbstractDataStore follower2DistributedDataStore = follower2TestKit.setupAbstractDataStore(
testParameter, testName, MODULE_SHARDS_CARS_PEOPLE_1_2_3, false)) {
commitTimeout);
try (AbstractDataStore follower2DistributedDataStore = follower2TestKit.setupAbstractDataStore(
testParameter, testName, MODULE_SHARDS_CARS_PEOPLE_1_2_3, false)) {
@@
-1009,7
+1009,7
@@
public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
- readTx.read(CarsModel.BASE_PATH).
checkedG
et(5, TimeUnit.SECONDS);
+ readTx.read(CarsModel.BASE_PATH).
g
et(5, TimeUnit.SECONDS);
// Shutdown the leader and try to create a new tx.
// Shutdown the leader and try to create a new tx.
@@
-1044,7
+1044,7
@@
public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
- readTx.read(CarsModel.BASE_PATH).
checkedG
et(5, TimeUnit.SECONDS);
+ readTx.read(CarsModel.BASE_PATH).
g
et(5, TimeUnit.SECONDS);
// Shutdown the leader and try to create a new tx.
// Shutdown the leader and try to create a new tx.
@@
-1095,7
+1095,7
@@
public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
// Do an initial read to get the primary shard info cached.
final DOMStoreReadTransaction readTx = followerDistributedDataStore.newReadOnlyTransaction();
- readTx.read(CarsModel.BASE_PATH).
checkedG
et(5, TimeUnit.SECONDS);
+ readTx.read(CarsModel.BASE_PATH).
g
et(5, TimeUnit.SECONDS);
// Shutdown the leader and try to create a new tx.
// Shutdown the leader and try to create a new tx.
@@
-1142,7
+1142,7
@@
public class DistributedDataStoreRemotingIntegrationTest extends AbstractTest {
initDatastoresWithCars(testName);
final Optional<NormalizedNode<?, ?>> readOptional = leaderDistributedDataStore.newReadOnlyTransaction().read(
initDatastoresWithCars(testName);
final Optional<NormalizedNode<?, ?>> readOptional = leaderDistributedDataStore.newReadOnlyTransaction().read(
- CarsModel.BASE_PATH).
checkedG
et(5, TimeUnit.SECONDS);
+ CarsModel.BASE_PATH).
g
et(5, TimeUnit.SECONDS);
assertEquals("isPresent", true, readOptional.isPresent());
assertEquals("Node", carsNode, readOptional.get());
assertEquals("isPresent", true, readOptional.isPresent());
assertEquals("Node", carsNode, readOptional.get());