Bug 8163: getDataTreeChangeListenerExecutor() & DataBrokerTestModule
[controller.git] / opendaylight / md-sal / sal-binding-broker / src / test / java / org / opendaylight / controller / md / sal / binding / test / AbstractDataBrokerTest.java
1 /*
2  * Copyright (c) 2014 Cisco Systems, 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 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
11 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
12
13 /**
14  * AbstractDataBrokerTest.
15  *
16  * @deprecated Please now use the AbstractConcurrentDataBrokerTest instead of
17  *             this. Normally in a well written test this should be a drop-in
18  *             replacement. Instead of {@literal @}Override
19  *             setupWithDataBroker(DataBroker dataBroker), please just use
20  *             JUnit's {@literal @}Before before() { ... getDataBroker() }. Some
21  *             tests which relied on the Test DataBroker being synchronous,
22  *             contrary to its specification as well as the production
23  *             implementation, may require changes to e.g. use get() on
24  *             submit()'ed transaction to make the test wait before asserts. See
25  *             also
26  *             <a href="https://bugs.opendaylight.org/show_bug.cgi?id=7538">bug
27  *             7538</a> for more details.
28  */
29 @Deprecated
30 public class AbstractDataBrokerTest extends AbstractBaseDataBrokerTest {
31
32     @Override
33     protected AbstractDataBrokerTestCustomizer createDataBrokerTestCustomizer() {
34         return new DataBrokerTestCustomizer();
35     }
36
37     @Override
38     protected void setupWithSchema(SchemaContext context) {
39         super.setupWithSchema(context);
40         setupWithDataBroker(getDataBroker());
41     }
42
43     protected void setupWithDataBroker(final DataBroker dataBroker) {
44         // Intentionally left No-op, subclasses may customize it
45     }
46
47 }