2 * Copyright (c) 2014 Cisco Systems, 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;
10 import org.opendaylight.controller.md.sal.binding.api.DataBroker;
11 import org.opendaylight.yangtools.yang.model.api.SchemaContext;
14 * AbstractDataBrokerTest.
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
26 * <a href="https://bugs.opendaylight.org/show_bug.cgi?id=7538">bug
27 * 7538</a> for more details.
30 public class AbstractDataBrokerTest extends AbstractBaseDataBrokerTest {
33 protected AbstractDataBrokerTestCustomizer createDataBrokerTestCustomizer() {
34 return new DataBrokerTestCustomizer();
38 protected void setupWithSchema(SchemaContext context) {
39 super.setupWithSchema(context);
40 setupWithDataBroker(getDataBroker());
43 protected void setupWithDataBroker(final DataBroker dataBroker) {
44 // Intentionally left No-op, subclasses may customize it