Bug 2055: Handle Tx create in TransactionProxy resiliently
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / test / java / org / opendaylight / controller / cluster / datastore / DataChangeListenerRegistrationProxyTest.java
index c27993f97b9fef669c03f0c378e83f8474944e96..9ac30095a5d9da2075168e946afa893f7e8c8eeb 100644 (file)
@@ -204,8 +204,7 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest {
 
             doReturn(mockActorSystem).when(actorContext).getActorSystem();
             doReturn(duration("5 seconds")).when(actorContext).getOperationDuration();
-            doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName),
-                    any(Timeout.class));
+            doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName));
             doReturn(Futures.failed(new RuntimeException("mock"))).
                     when(actorContext).executeOperationAsync(any(ActorRef.class),
                             any(Object.class), any(Timeout.class));
@@ -228,12 +227,12 @@ public class DataChangeListenerRegistrationProxyTest extends AbstractActorTest {
             final DataChangeListenerRegistrationProxy proxy = new DataChangeListenerRegistrationProxy(
                     shardName, actorContext, mockListener);
 
+            doReturn(DatastoreContext.newBuilder().build()).when(actorContext).getDatastoreContext();
             doReturn(getSystem()).when(actorContext).getActorSystem();
             doReturn(getSystem().actorSelection(getRef().path())).
                     when(actorContext).actorSelection(getRef().path());
             doReturn(duration("5 seconds")).when(actorContext).getOperationDuration();
-            doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName),
-                    any(Timeout.class));
+            doReturn(Futures.successful(getRef())).when(actorContext).findLocalShardAsync(eq(shardName));
 
             Answer<Future<Object>> answer = new Answer<Future<Object>>() {
                 @Override