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.controller.md.sal.binding.test;
11 * AbstractConcurrentDataBrokerTest.
13 * <p>Uses single thread executor for the Serialized DOM DataBroker (instead of the
14 * direct executor used by the {@literal @}Deprecated AbstractDataBrokerTest) in order
15 * to allow tests to use the DataBroker concurrently from several threads.
17 * <p>See also <a href="https://bugs.opendaylight.org/show_bug.cgi?id=7538">bug 7538</a> for more details.
19 * @author Michael Vorburger
21 public abstract class AbstractConcurrentDataBrokerTest extends AbstractBaseDataBrokerTest {
22 private final boolean useMTDataTreeChangeListenerExecutor;
24 protected AbstractConcurrentDataBrokerTest() {
28 protected AbstractConcurrentDataBrokerTest(final boolean useMTDataTreeChangeListenerExecutor) {
29 this.useMTDataTreeChangeListenerExecutor = useMTDataTreeChangeListenerExecutor;
33 protected AbstractDataBrokerTestCustomizer createDataBrokerTestCustomizer() {
34 return new ConcurrentDataBrokerTestCustomizer(useMTDataTreeChangeListenerExecutor);