import org.junit.After;
import org.junit.Before;
import org.junit.Test;
-import org.opendaylight.controller.md.sal.binding.api.ReadWriteTransaction;
-import org.opendaylight.controller.md.sal.common.api.data.LogicalDatastoreType;
-import org.opendaylight.controller.md.sal.common.api.data.TransactionCommitFailedException;
+import org.opendaylight.mdsal.binding.api.ReadWriteTransaction;
import org.opendaylight.mdsal.common.api.CommitInfo;
+import org.opendaylight.mdsal.common.api.LogicalDatastoreType;
import org.opendaylight.unimgr.mef.nrp.api.TapiConstants;
import org.opendaylight.unimgr.mef.nrp.common.NrpDao;
import org.opendaylight.unimgr.mef.nrp.common.TapiUtils;
public void tearDown() throws Exception {
abstractNodeHandler.close();
- removeContext();
+ //removeContext();
}
@Test
public void testNodeAddition()
- throws TransactionCommitFailedException, InterruptedException, ExecutionException {
+ throws InterruptedException, ExecutionException {
//when
performNrpDaoAction(addNode,null).get();
@Test
public void testNepAddition()
- throws TransactionCommitFailedException, InterruptedException, ExecutionException {
+ throws InterruptedException, ExecutionException {
//given
String newNepName = "newNep";
performNrpDaoAction(addNode,null).get();
}
@Test
- public void testNepUpdate() throws TransactionCommitFailedException, InterruptedException, ExecutionException {
+ public void testNepUpdate() throws InterruptedException, ExecutionException {
//given
performNrpDaoAction(addNode, null).get();
@Test
public void testNepUpdatedWithSipAddition()
- throws ExecutionException, InterruptedException, TransactionCommitFailedException {
+ throws ExecutionException, InterruptedException {
//given
ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();
@Test
public void testNepUpdatedWithSipRemoval()
- throws ExecutionException, InterruptedException, TransactionCommitFailedException {
+ throws ExecutionException, InterruptedException {
//given we have sips
ReadWriteTransaction tx = dataBroker.newReadWriteTransaction();
final Node n1 = n(tx, true, new Uuid("n1"), "d1", "n1:1", "n1:2");
}
@Test
- public void testNodeRemoval() throws TransactionCommitFailedException, InterruptedException, ExecutionException {
+ public void testNodeRemoval() throws InterruptedException, ExecutionException {
//given
performNrpDaoAction(addNode,null).get();
performNrpDaoAction(removeNode,null).get();
//then
- Node node = getAbstractNode(n -> n.getOwnedNodeEdgePoint() != null && n.getOwnedNodeEdgePoint().isEmpty());
- assertTrue(node.getOwnedNodeEdgePoint().isEmpty());
+ Node node = getAbstractNode(n -> n.getOwnedNodeEdgePoint() == null || n.getOwnedNodeEdgePoint().isEmpty());
+ assertTrue(node.getOwnedNodeEdgePoint() == null || node.getOwnedNodeEdgePoint().isEmpty());
}
@Test
- public void testNepRemoval() throws TransactionCommitFailedException, InterruptedException, ExecutionException {
+ public void testNepRemoval() throws InterruptedException, ExecutionException {
//given
performNrpDaoAction(addNode,null).get();
String nepNameToRemove = TEST_NEP_NAME + "0";