We have deprecated these methods, make sure we migrate the test
so that it does not add false warnings.
Change-Id: I3a6bd6b936f34478fe7afdcc26547ffa7edb8992
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit
77998716f93d97aa8e58e408db6d956d81b727ff)
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class WriteTransactionTest extends AbstractDataBrokerTest {
import org.opendaylight.yangtools.yang.binding.InstanceIdentifier;
public class WriteTransactionTest extends AbstractDataBrokerTest {
private static final InstanceIdentifier<Top> TOP_PATH = InstanceIdentifier.create(Top.class);
private static final TopLevelListKey TOP_LIST_KEY = new TopLevelListKey("foo");
private static final InstanceIdentifier<TopLevelList> NODE_PATH = TOP_PATH.child(TopLevelList.class, TOP_LIST_KEY);
private static final InstanceIdentifier<Top> TOP_PATH = InstanceIdentifier.create(Top.class);
private static final TopLevelListKey TOP_LIST_KEY = new TopLevelListKey("foo");
private static final InstanceIdentifier<TopLevelList> NODE_PATH = TOP_PATH.child(TopLevelList.class, TOP_LIST_KEY);
@Test
public void testPutCreateParentsSuccess() throws InterruptedException, ExecutionException {
@Test
public void testPutCreateParentsSuccess() throws InterruptedException, ExecutionException {
final WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
final WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
- writeTx.put(LogicalDatastoreType.OPERATIONAL, NODE_PATH, NODE,true);
+ writeTx.mergeParentStructurePut(LogicalDatastoreType.OPERATIONAL, NODE_PATH, NODE);
writeTx.commit().get();
final ReadTransaction readTx = getDataBroker().newReadOnlyTransaction();
writeTx.commit().get();
final ReadTransaction readTx = getDataBroker().newReadOnlyTransaction();
@Test
public void testMergeCreateParentsSuccess() throws InterruptedException, ExecutionException {
@Test
public void testMergeCreateParentsSuccess() throws InterruptedException, ExecutionException {
final WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
final WriteTransaction writeTx = getDataBroker().newWriteOnlyTransaction();
- writeTx.merge(LogicalDatastoreType.OPERATIONAL, NODE_PATH, NODE,true);
+ writeTx.mergeParentStructureMerge(LogicalDatastoreType.OPERATIONAL, NODE_PATH, NODE);
writeTx.commit().get();
final ReadTransaction readTx = getDataBroker().newReadOnlyTransaction();
writeTx.commit().get();
final ReadTransaction readTx = getDataBroker().newReadOnlyTransaction();
final Optional<TopLevelList> listNode = readTx.read(LogicalDatastoreType.OPERATIONAL, NODE_PATH).get();
assertTrue("List node must exists after commit",listNode.isPresent());
}
final Optional<TopLevelList> listNode = readTx.read(LogicalDatastoreType.OPERATIONAL, NODE_PATH).get();
assertTrue("List node must exists after commit",listNode.isPresent());
}