1 | /**
|
---|
2 | * Copyright 2012-2017 Michael Tamm and other junit-toolbox contributors
|
---|
3 | *
|
---|
4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
---|
5 | * you may not use this file except in compliance with the License.
|
---|
6 | * You may obtain a copy of the License at
|
---|
7 | *
|
---|
8 | * http://www.apache.org/licenses/LICENSE-2.0
|
---|
9 | *
|
---|
10 | * Unless required by applicable law or agreed to in writing, software
|
---|
11 | * distributed under the License is distributed on an "AS IS" BASIS,
|
---|
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
---|
13 | * See the License for the specific language governing permissions and
|
---|
14 | * limitations under the License.
|
---|
15 | */
|
---|
16 | package org.openstreetmap.josm.testutils;
|
---|
17 |
|
---|
18 | import org.junit.runners.Parameterized;
|
---|
19 |
|
---|
20 | /**
|
---|
21 | * An extension of the JUnit {@link Parameterized} runner,
|
---|
22 | * which executes the tests for each parameter set concurrently.
|
---|
23 | * <p>The maximum number of test threads will be the number of
|
---|
24 | * {@link Runtime#availableProcessors() available processors}.
|
---|
25 | *
|
---|
26 | * @author Michael Tamm (junit-toolbox)
|
---|
27 | */
|
---|
28 | public class ParallelParameterized extends Parameterized {
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * Constructs a new {@code ParallelParameterized}.
|
---|
32 | * @param klass the root of the suite
|
---|
33 | * @throws Throwable in case of error
|
---|
34 | */
|
---|
35 | public ParallelParameterized(Class<?> klass) throws Throwable {
|
---|
36 | super(klass);
|
---|
37 | setScheduler(new ParallelScheduler());
|
---|
38 | }
|
---|
39 | }
|
---|