DataBrokerTestModule: use AbstractDataBrokerTest without inheritance
[mdsal.git] / binding / mdsal-binding-dom-adapter / src / test / java / org / opendaylight / mdsal / binding / dom / adapter / test / DataBrokerTestCustomizer.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.mdsal.binding.dom.adapter.test;
9
10 import com.google.common.util.concurrent.ListeningExecutorService;
11 import com.google.common.util.concurrent.MoreExecutors;
12
13 /**
14  * AbstractDataBrokerTestCustomizer implementation that performs synchronous commits via a direct executor.
15  * Note that this can cause issues if used in a concurrent manner so it is recommended to use
16  * ConcurrentDataBrokerTestCustomizer instead.
17  */
18 public class DataBrokerTestCustomizer extends AbstractDataBrokerTestCustomizer {
19
20     @Override
21     public ListeningExecutorService getCommitCoordinatorExecutor() {
22         return MoreExecutors.newDirectExecutorService();
23     }
24 }