Fix followerDistributedDataStore tear down
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / md / sal / binding / test / AbstractConcurrentDataBrokerTest.java
1 /*
2  * Copyright (c) 2017 Red Hat, Inc. and others. All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.md.sal.binding.test;
9
10 /**
11  * AbstractConcurrentDataBrokerTest.
12  *
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.
16  *
17  * <p>See also <a href="https://bugs.opendaylight.org/show_bug.cgi?id=7538">bug 7538</a> for more details.
18  *
19  * @author Michael Vorburger
20  */
21 @Deprecated
22 public abstract class AbstractConcurrentDataBrokerTest extends AbstractBaseDataBrokerTest {
23     private final boolean useMTDataTreeChangeListenerExecutor;
24
25     protected AbstractConcurrentDataBrokerTest() {
26         this(false);
27     }
28
29     protected AbstractConcurrentDataBrokerTest(final boolean useMTDataTreeChangeListenerExecutor) {
30         this.useMTDataTreeChangeListenerExecutor = useMTDataTreeChangeListenerExecutor;
31     }
32
33     @Override
34     protected AbstractDataBrokerTestCustomizer createDataBrokerTestCustomizer() {
35         return new ConcurrentDataBrokerTestCustomizer(useMTDataTreeChangeListenerExecutor);
36     }
37
38 }