2 * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.mdsal.binding.dom.adapter.test;
11 * Abstract base for DataBroker tests.
13 * <p>Uses single thread executor for the Serialized DOM DataBroker (instead of the direct executor used by the
14 * AbstractDataBrokerTest) in order to allow tests to use the DataBroker concurrently from several threads.
16 * @author Michael Vorburger
18 public abstract class AbstractConcurrentDataBrokerTest extends AbstractBaseDataBrokerTest {
19 private final boolean useMTDataTreeChangeListenerExecutor;
21 protected AbstractConcurrentDataBrokerTest() {
25 protected AbstractConcurrentDataBrokerTest(final boolean useMTDataTreeChangeListenerExecutor) {
26 this.useMTDataTreeChangeListenerExecutor = useMTDataTreeChangeListenerExecutor;
30 protected AbstractDataBrokerTestCustomizer createDataBrokerTestCustomizer() {
31 return new ConcurrentDataBrokerTestCustomizer(useMTDataTreeChangeListenerExecutor);