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;
10 import com.google.common.util.concurrent.ListeningExecutorService;
11 import com.google.common.util.concurrent.MoreExecutors;
12 import java.util.concurrent.Executors;
15 * ConcurrentDataBrokerTestCustomizer.
17 * <p>See {@link AbstractConcurrentDataBrokerTest} and
18 * <a href="https://bugs.opendaylight.org/show_bug.cgi?id=7538">bug 7538</a> for more details & background.
20 * @author Michael Vorburger
22 public class ConcurrentDataBrokerTestCustomizer extends AbstractDataBrokerTestCustomizer {
25 public ListeningExecutorService getCommitCoordinatorExecutor() {
26 return MoreExecutors.listeningDecorator(Executors.newSingleThreadExecutor());
29 public void useMTDataTreeChangeListenerExecutor() {
30 setDataTreeChangeListenerExecutor(MoreExecutors.listeningDecorator(Executors.newCachedThreadPool()));