use of org.opendaylight.mdsal.binding.dom.adapter.test.ConcurrentDataBrokerTestCustomizer in project bgpcep by opendaylight.
the class StateProviderImplTest method createDataBrokerTestCustomizer.
@Override
protected AbstractDataBrokerTestCustomizer createDataBrokerTestCustomizer() {
return new ConcurrentDataBrokerTestCustomizer(true) {
@Override
public DOMStore createOperationalDatastore() {
realOperStore = new InMemoryDOMDataStore("OPER", getDataTreeChangeListenerExecutor());
spiedOperStore = spy(realOperStore);
getSchemaService().registerSchemaContextListener(spiedOperStore);
return spiedOperStore;
}
@Override
public ListeningExecutorService getCommitCoordinatorExecutor() {
return MoreExecutors.newDirectExecutorService();
}
};
}
use of org.opendaylight.mdsal.binding.dom.adapter.test.ConcurrentDataBrokerTestCustomizer in project netconf by opendaylight.
the class NetconfCommandsImplTest method setUp.
@Before
public void setUp() throws Exception {
ConcurrentDataBrokerTestCustomizer customizer = new ConcurrentDataBrokerTestCustomizer(true);
dataBroker = customizer.createDataBroker();
customizer.updateSchema(RUNTIME_CONTEXT);
netconfCommands = new NetconfCommandsImpl(dataBroker);
}
use of org.opendaylight.mdsal.binding.dom.adapter.test.ConcurrentDataBrokerTestCustomizer in project netconf by opendaylight.
the class NetconfDeviceTopologyAdapterTest method setUp.
@Before
public void setUp() throws Exception {
doReturn(writeTx).when(txChain).newWriteOnlyTransaction();
doNothing().when(writeTx).put(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Node.class));
doNothing().when(writeTx).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(NetworkTopology.class));
doReturn(txIdent).when(writeTx).getIdentifier();
ConcurrentDataBrokerTestCustomizer customizer = new ConcurrentDataBrokerTestCustomizer(true);
domDataBroker = customizer.getDOMDataBroker();
dataBroker = customizer.createDataBroker();
customizer.updateSchema(RUNTIME_CONTEXT);
transactionChain = dataBroker.createTransactionChain(new TransactionChainListener() {
@Override
public void onTransactionChainFailed(final TransactionChain chain, final Transaction transaction, final Throwable cause) {
}
@Override
public void onTransactionChainSuccessful(final TransactionChain chain) {
}
});
}
Aggregations