summaryrefslogtreecommitdiffstats
path: root/northbound/daexim-offsite-backup/provider/src/test
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2021-01-29 17:42:42 +0000
committerDan Timoney <dtimoney@att.com>2021-01-29 17:42:42 +0000
commit0e4e58bf061df695341ac250beb97a978cefdaf7 (patch)
tree06539b81ae2f3bbeddd3f7f30199cdd200a8480c /northbound/daexim-offsite-backup/provider/src/test
parentce4e5f9a00d2677495240ad367b9bfc4b74752d0 (diff)
Revert "migrate sli to alu-SR1"
This reverts commit ce4e5f9a00d2677495240ad367b9bfc4b74752d0. Reason for revert: ODL upgrade changes need to be backed out until issues in ccsdk/features are resolved. Change-Id: I168e2519e37f3eee61609d0da890c14db49ec49e
Diffstat (limited to 'northbound/daexim-offsite-backup/provider/src/test')
-rw-r--r--northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java b/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java
index 03fe37513..0f0cee288 100644
--- a/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java
+++ b/northbound/daexim-offsite-backup/provider/src/test/java/org/onap/ccsdk/sli/northbound/daeximoffsitebackup/DaeximOffsiteBackupProviderTest.java
@@ -26,7 +26,7 @@ import static org.junit.Assert.fail;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
-import com.google.common.util.concurrent.FluentFuture;
+import com.google.common.util.concurrent.CheckedFuture;
import java.io.File;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
@@ -38,9 +38,10 @@ import java.util.concurrent.ExecutionException;
import org.eclipse.jdt.annotation.Nullable;
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.mdsal.binding.api.DataBroker;
-import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
-import org.opendaylight.mdsal.binding.api.RpcProviderService;
+import org.opendaylight.controller.md.sal.binding.api.DataBroker;
+import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
+import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.controller.sal.binding.api.RpcProviderRegistry;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.daeximoffsitebackup.rev180926.DaeximOffsiteBackupService;
import org.opendaylight.yang.gen.v1.org.onap.ccsdk.sli.northbound.daeximoffsitebackup.rev180926.RetrieveDataInput;
import org.opendaylight.yangtools.yang.binding.Augmentation;
@@ -48,8 +49,8 @@ import org.opendaylight.yangtools.yang.binding.Augmentation;
public class DaeximOffsiteBackupProviderTest {
public DataBroker dataBroker;
public ReadWriteTransaction writeTransaction;
- public FluentFuture checkedFuture;
- public RpcProviderService rpcRegistry;
+ public CheckedFuture<Void, TransactionCommitFailedException> checkedFuture;
+ public RpcProviderRegistry rpcRegistry;
public DaeximOffsiteBackupProvider provider;
public Properties resProps;
@@ -60,16 +61,16 @@ public class DaeximOffsiteBackupProviderTest {
resProps.put("error-message", "Success");
dataBroker = mock(DataBroker.class);
writeTransaction = mock(ReadWriteTransaction.class);
- checkedFuture = mock(FluentFuture.class);
- rpcRegistry = mock(RpcProviderService.class);
- when(rpcRegistry.registerRpcImplementation(any(), any(DaeximOffsiteBackupService.class))).thenReturn(null);
+ checkedFuture = mock(CheckedFuture.class);
+ rpcRegistry = mock(RpcProviderRegistry.class);
+ when(rpcRegistry.addRoutedRpcImplementation(any(), any(DaeximOffsiteBackupService.class))).thenReturn(null);
try {
when(checkedFuture.get()).thenReturn(null);
}
catch(InterruptedException | ExecutionException e) {
e.printStackTrace();
}
- when(writeTransaction.commit()).thenReturn(checkedFuture);
+ when(writeTransaction.submit()).thenReturn(checkedFuture);
when(dataBroker.newReadWriteTransaction()).thenReturn(writeTransaction);
provider = new DaeximOffsiteBackupProvider(dataBroker, rpcRegistry);