Search in sources :

Example 31 with TopLevelList

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList in project genius by opendaylight.

the class DataTreeEventCallbackRegistrarTest method testExceptionInCallbackMustBeLogged.

@SuppressWarnings({ "unchecked", "rawtypes" })
@Test
public void testExceptionInCallbackMustBeLogged() throws TransactionCommitFailedException, InterruptedException {
    logCaptureRule.expectLastErrorMessageContains("Error invoking worker");
    DataBroker spiedDataBroker = spy(db);
    final DataTreeChangeListener mockListener = mock(DataTreeChangeListener.class, "TestListener");
    doAnswer(invocation -> db.registerDataTreeChangeListener(invocation.getArgument(0), mockListener)).when(spiedDataBroker).registerDataTreeChangeListener(any(), any());
    AtomicBoolean added = new AtomicBoolean(false);
    DataTreeEventCallbackRegistrar dataTreeEventCallbackRegistrar = new DataTreeEventCallbackRegistrarImpl(spiedDataBroker);
    dataTreeEventCallbackRegistrar.onAdd(OPERATIONAL, FOO_PATH, (Function<TopLevelList, NextAction>) topLevelList -> {
        added.set(true);
        throw new IllegalStateException("TEST");
    });
    ArgumentCaptor<DataTreeChangeListener> realListener = ArgumentCaptor.forClass(DataTreeChangeListener.class);
    verify(spiedDataBroker).registerDataTreeChangeListener(any(), realListener.capture());
    AtomicBoolean onDataTreeChangeDone = new AtomicBoolean(false);
    doAnswer(invocation -> {
        try {
            realListener.getValue().onDataTreeChanged(invocation.getArgument(0));
        } finally {
            onDataTreeChangeDone.set(true);
        }
        return null;
    }).when(mockListener).onDataTreeChanged(anyCollection());
    db1.syncWrite(OPERATIONAL, FOO_PATH, FOO_DATA);
    await().untilTrue(added);
    await().untilTrue(onDataTreeChangeDone);
}
Also used : DataTreeChangeListener(org.opendaylight.mdsal.binding.api.DataTreeChangeListener) SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) ScheduledFuture(java.util.concurrent.ScheduledFuture) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) ListsBindingUtils.topLevelList(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList) LoggerFactory(org.slf4j.LoggerFactory) AbstractConcurrentDataBrokerTest(org.opendaylight.mdsal.binding.dom.adapter.test.AbstractConcurrentDataBrokerTest) ListenerRegistration(org.opendaylight.yangtools.concepts.ListenerRegistration) OPERATIONAL(org.opendaylight.mdsal.common.api.LogicalDatastoreType.OPERATIONAL) DataTreeEventCallbackRegistrar(org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar) RetryingManagedNewTransactionRunner(org.opendaylight.mdsal.binding.util.RetryingManagedNewTransactionRunner) Mockito.doAnswer(org.mockito.Mockito.doAnswer) Duration(java.time.Duration) Datastore(org.opendaylight.mdsal.binding.util.Datastore) Mockito.doReturn(org.mockito.Mockito.doReturn) Awaitility.await(org.awaitility.Awaitility.await) TOP_FOO_KEY(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.TOP_FOO_KEY) ListsBindingUtils.path(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.path) CountDownLatch(java.util.concurrent.CountDownLatch) LogCaptureRule(org.opendaylight.infrautils.testutils.LogCaptureRule) NextAction(org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar.NextAction) Mockito.mock(org.mockito.Mockito.mock) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) MoreExecutors(com.google.common.util.concurrent.MoreExecutors) ArgumentMatchers.anyLong(org.mockito.ArgumentMatchers.anyLong) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) DataTreeIdentifier(org.opendaylight.mdsal.binding.api.DataTreeIdentifier) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) ArgumentMatchers.anyBoolean(org.mockito.ArgumentMatchers.anyBoolean) Mockito.spy(org.mockito.Mockito.spy) Function(java.util.function.Function) ListsBindingUtils.complexUsesAugment(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.complexUsesAugment) ArgumentCaptor(org.mockito.ArgumentCaptor) ScheduledExecutorService(java.util.concurrent.ScheduledExecutorService) ListeningScheduledExecutorService(com.google.common.util.concurrent.ListeningScheduledExecutorService) Uninterruptibles(com.google.common.util.concurrent.Uninterruptibles) Logger(org.slf4j.Logger) USES_ONE_KEY(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.USES_ONE_KEY) Test(org.junit.Test) Truth.assertThat(com.google.common.truth.Truth.assertThat) LogRule(org.opendaylight.infrautils.testutils.LogRule) TransactionCommitFailedException(org.opendaylight.mdsal.common.api.TransactionCommitFailedException) Mockito.verify(org.mockito.Mockito.verify) TimeUnit(java.util.concurrent.TimeUnit) ArgumentMatchers.anyCollection(org.mockito.ArgumentMatchers.anyCollection) DataTreeEventCallbackRegistrarImpl(org.opendaylight.genius.datastoreutils.listeners.internal.DataTreeEventCallbackRegistrarImpl) Mockito.never(org.mockito.Mockito.never) Rule(org.junit.Rule) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) DataTreeChangeListener(org.opendaylight.mdsal.binding.api.DataTreeChangeListener) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) DataTreeEventCallbackRegistrar(org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar) SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) NextAction(org.opendaylight.genius.datastoreutils.listeners.DataTreeEventCallbackRegistrar.NextAction) DataTreeEventCallbackRegistrarImpl(org.opendaylight.genius.datastoreutils.listeners.internal.DataTreeEventCallbackRegistrarImpl) AbstractConcurrentDataBrokerTest(org.opendaylight.mdsal.binding.dom.adapter.test.AbstractConcurrentDataBrokerTest) Test(org.junit.Test)

Example 32 with TopLevelList

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList in project genius by opendaylight.

the class ManagedNewTransactionRunnerImplTest method testCallWithNewTypedWriteOnlyTransactionAndSubmitPutSuccessfully.

@Test
public void testCallWithNewTypedWriteOnlyTransactionAndSubmitPutSuccessfully() throws Exception {
    TopLevelList data = newTestDataObject();
    managedNewTransactionRunner.callWithNewWriteOnlyTransactionAndSubmit(OPERATIONAL, writeTx -> writeTx.put(TEST_PATH, data)).get();
    assertEquals(data, singleTransactionDataBroker.syncRead(LogicalDatastoreType.OPERATIONAL, TEST_PATH));
}
Also used : SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) Assert.assertThrows(org.junit.Assert.assertThrows) ListsBindingUtils.topLevelList(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList) ContainerWithUsesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) DataBrokerTestModule(org.opendaylight.mdsal.binding.testutils.DataBrokerTestModule) ManagedNewTransactionRunnerImpl(org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl) Assert.fail(org.junit.Assert.fail) Before(org.junit.Before) TreeComplexUsesAugmentBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugmentBuilder) TOP_FOO_KEY(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.TOP_FOO_KEY) ManagedNewTransactionRunner(org.opendaylight.genius.infra.ManagedNewTransactionRunner) WriteTransaction(org.opendaylight.mdsal.binding.api.WriteTransaction) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) TreeComplexUsesAugment(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugment) Truth.assertThat(com.google.common.truth.Truth.assertThat) DataBrokerFailuresImpl(org.opendaylight.genius.datastoreutils.testutils.DataBrokerFailuresImpl) ListsBindingUtils.path(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.path) LogRule(org.opendaylight.infrautils.testutils.LogRule) TransactionCommitFailedException(org.opendaylight.mdsal.common.api.TransactionCommitFailedException) OPERATIONAL(org.opendaylight.genius.infra.Datastore.OPERATIONAL) ExecutionException(java.util.concurrent.ExecutionException) OptimisticLockFailedException(org.opendaylight.mdsal.common.api.OptimisticLockFailedException) Rule(org.junit.Rule) LogCaptureRule(org.opendaylight.infrautils.testutils.LogCaptureRule) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) Test(org.junit.Test)

Example 33 with TopLevelList

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList in project genius by opendaylight.

the class ManagedNewTransactionRunnerImplTest method testCallWithNewTypedReadWriteTransactionAndSubmitPutSuccessfully.

@Test
public void testCallWithNewTypedReadWriteTransactionAndSubmitPutSuccessfully() throws Exception {
    TopLevelList data = newTestDataObject();
    managedNewTransactionRunner.callWithNewReadWriteTransactionAndSubmit(OPERATIONAL, tx -> tx.put(TEST_PATH, data)).get();
    assertEquals(data, singleTransactionDataBroker.syncRead(LogicalDatastoreType.OPERATIONAL, TEST_PATH));
}
Also used : SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) Assert.assertThrows(org.junit.Assert.assertThrows) ListsBindingUtils.topLevelList(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList) ContainerWithUsesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) DataBrokerTestModule(org.opendaylight.mdsal.binding.testutils.DataBrokerTestModule) ManagedNewTransactionRunnerImpl(org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl) Assert.fail(org.junit.Assert.fail) Before(org.junit.Before) TreeComplexUsesAugmentBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugmentBuilder) TOP_FOO_KEY(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.TOP_FOO_KEY) ManagedNewTransactionRunner(org.opendaylight.genius.infra.ManagedNewTransactionRunner) WriteTransaction(org.opendaylight.mdsal.binding.api.WriteTransaction) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) TreeComplexUsesAugment(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugment) Truth.assertThat(com.google.common.truth.Truth.assertThat) DataBrokerFailuresImpl(org.opendaylight.genius.datastoreutils.testutils.DataBrokerFailuresImpl) ListsBindingUtils.path(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.path) LogRule(org.opendaylight.infrautils.testutils.LogRule) TransactionCommitFailedException(org.opendaylight.mdsal.common.api.TransactionCommitFailedException) OPERATIONAL(org.opendaylight.genius.infra.Datastore.OPERATIONAL) ExecutionException(java.util.concurrent.ExecutionException) OptimisticLockFailedException(org.opendaylight.mdsal.common.api.OptimisticLockFailedException) Rule(org.junit.Rule) LogCaptureRule(org.opendaylight.infrautils.testutils.LogCaptureRule) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) Test(org.junit.Test)

Example 34 with TopLevelList

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList in project genius by opendaylight.

the class ManagedNewTransactionRunnerImplTest method testCallWithNewReadWriteTransactionAndSubmitPutSuccessfully.

@Test
public void testCallWithNewReadWriteTransactionAndSubmitPutSuccessfully() throws Exception {
    TopLevelList data = newTestDataObject();
    managedNewTransactionRunner.callWithNewReadWriteTransactionAndSubmit(tx -> tx.put(LogicalDatastoreType.OPERATIONAL, TEST_PATH, data)).get();
    assertEquals(data, singleTransactionDataBroker.syncRead(LogicalDatastoreType.OPERATIONAL, TEST_PATH));
}
Also used : SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) Assert.assertThrows(org.junit.Assert.assertThrows) ListsBindingUtils.topLevelList(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList) ContainerWithUsesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) DataBrokerTestModule(org.opendaylight.mdsal.binding.testutils.DataBrokerTestModule) ManagedNewTransactionRunnerImpl(org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl) Assert.fail(org.junit.Assert.fail) Before(org.junit.Before) TreeComplexUsesAugmentBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugmentBuilder) TOP_FOO_KEY(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.TOP_FOO_KEY) ManagedNewTransactionRunner(org.opendaylight.genius.infra.ManagedNewTransactionRunner) WriteTransaction(org.opendaylight.mdsal.binding.api.WriteTransaction) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) TreeComplexUsesAugment(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugment) Truth.assertThat(com.google.common.truth.Truth.assertThat) DataBrokerFailuresImpl(org.opendaylight.genius.datastoreutils.testutils.DataBrokerFailuresImpl) ListsBindingUtils.path(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.path) LogRule(org.opendaylight.infrautils.testutils.LogRule) TransactionCommitFailedException(org.opendaylight.mdsal.common.api.TransactionCommitFailedException) OPERATIONAL(org.opendaylight.genius.infra.Datastore.OPERATIONAL) ExecutionException(java.util.concurrent.ExecutionException) OptimisticLockFailedException(org.opendaylight.mdsal.common.api.OptimisticLockFailedException) Rule(org.junit.Rule) LogCaptureRule(org.opendaylight.infrautils.testutils.LogCaptureRule) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) Test(org.junit.Test)

Example 35 with TopLevelList

use of org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList in project genius by opendaylight.

the class ManagedNewTransactionRunnerImplTest method testCallWithNewWriteOnlyTransactionAndSubmitPutSuccessfully.

@Test
public void testCallWithNewWriteOnlyTransactionAndSubmitPutSuccessfully() throws Exception {
    TopLevelList data = newTestDataObject();
    managedNewTransactionRunner.callWithNewWriteOnlyTransactionAndSubmit(writeTx -> writeTx.put(LogicalDatastoreType.OPERATIONAL, TEST_PATH, data)).get();
    assertEquals(data, singleTransactionDataBroker.syncRead(LogicalDatastoreType.OPERATIONAL, TEST_PATH));
}
Also used : SingleTransactionDataBroker(org.opendaylight.genius.datastoreutils.SingleTransactionDataBroker) Assert.assertThrows(org.junit.Assert.assertThrows) ListsBindingUtils.topLevelList(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.topLevelList) ContainerWithUsesBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.complex.from.grouping.ContainerWithUsesBuilder) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) DataBrokerTestModule(org.opendaylight.mdsal.binding.testutils.DataBrokerTestModule) ManagedNewTransactionRunnerImpl(org.opendaylight.genius.infra.ManagedNewTransactionRunnerImpl) Assert.fail(org.junit.Assert.fail) Before(org.junit.Before) TreeComplexUsesAugmentBuilder(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugmentBuilder) TOP_FOO_KEY(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.TOP_FOO_KEY) ManagedNewTransactionRunner(org.opendaylight.genius.infra.ManagedNewTransactionRunner) WriteTransaction(org.opendaylight.mdsal.binding.api.WriteTransaction) Assert.assertTrue(org.junit.Assert.assertTrue) IOException(java.io.IOException) Test(org.junit.Test) TreeComplexUsesAugment(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.augment.rev140709.TreeComplexUsesAugment) Truth.assertThat(com.google.common.truth.Truth.assertThat) DataBrokerFailuresImpl(org.opendaylight.genius.datastoreutils.testutils.DataBrokerFailuresImpl) ListsBindingUtils.path(org.opendaylight.controller.md.sal.test.model.util.ListsBindingUtils.path) LogRule(org.opendaylight.infrautils.testutils.LogRule) TransactionCommitFailedException(org.opendaylight.mdsal.common.api.TransactionCommitFailedException) OPERATIONAL(org.opendaylight.genius.infra.Datastore.OPERATIONAL) ExecutionException(java.util.concurrent.ExecutionException) OptimisticLockFailedException(org.opendaylight.mdsal.common.api.OptimisticLockFailedException) Rule(org.junit.Rule) LogCaptureRule(org.opendaylight.infrautils.testutils.LogCaptureRule) InstanceIdentifier(org.opendaylight.yangtools.yang.binding.InstanceIdentifier) LogicalDatastoreType(org.opendaylight.mdsal.common.api.LogicalDatastoreType) Assert(org.junit.Assert) Assert.assertEquals(org.junit.Assert.assertEquals) DataBroker(org.opendaylight.mdsal.binding.api.DataBroker) TopLevelList(org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)61 TopLevelList (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelList)32 DataBroker (org.opendaylight.mdsal.binding.api.DataBroker)26 Assert.assertEquals (org.junit.Assert.assertEquals)23 LogicalDatastoreType (org.opendaylight.mdsal.common.api.LogicalDatastoreType)23 InstanceIdentifier (org.opendaylight.yangtools.yang.binding.InstanceIdentifier)22 OptimisticLockFailedException (org.opendaylight.mdsal.common.api.OptimisticLockFailedException)21 TopLevelList (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.controller.md.sal.test.list.rev140701.two.level.list.TopLevelList)20 WriteTransaction (org.opendaylight.mdsal.binding.api.WriteTransaction)18 DataObject (org.opendaylight.yangtools.yang.binding.DataObject)14 ManagedNewTransactionRunner (org.opendaylight.genius.infra.ManagedNewTransactionRunner)13 ExecutionException (java.util.concurrent.ExecutionException)12 Assert.assertThrows (org.junit.Assert.assertThrows)12 WriteTransaction (org.opendaylight.controller.md.sal.binding.api.WriteTransaction)12 Before (org.junit.Before)11 AbstractDataTreeChangeListenerTest (org.opendaylight.mdsal.binding.dom.adapter.test.AbstractDataTreeChangeListenerTest)11 TopLevelListKey (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.binding.rev140701.two.level.list.TopLevelListKey)11 IOException (java.io.IOException)10 OPERATIONAL (org.opendaylight.mdsal.binding.util.Datastore.OPERATIONAL)10 TreeComplexUsesAugmentBuilder (org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.mdsal.test.augment.rev140709.TreeComplexUsesAugmentBuilder)10