1 /*
2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19 package org.apache.maven.surefire.its;
20
21 import java.util.ArrayList;
22
23 import static org.junit.runners.Parameterized.Parameters;
24
25 /**
26 * Test class for SUREFIRE-580, configuration parameter {@code skipAfterFailureCount}.
27 *
28 * @author <a href="mailto:tibordigana@apache.org">Tibor Digana (tibor17)</a>
29 * @since 2.19
30 */
31 public class FailFastTestNgIT extends AbstractFailFastIT {
32
33 @Parameters(name = "{0}")
34 @SuppressWarnings("checkstyle:linelength")
35 public static Iterable<Object[]> data() {
36 /**
37 * reuseForks=false is not used because of race conditions and unpredictable commands received by
38 * MasterProcessReader, this feature has significant limitation.
39 */
40 ArrayList<Object[]> args = new ArrayList<>();
41 // description
42 // profile
43 // forkCount,
44 // fail-fast-count,
45 // reuseForks
46 // total
47 // failures
48 // errors
49 // skipped
50 // pipes
51 args.add(new Object[] {"testng-oneFork-ff1", null, props(1, 1, true), 5, 1, 0, 4, true});
52 args.add(new Object[] {"testng-oneFork-ff2", null, props(1, 2, true), 5, 2, 0, 3, true});
53 args.add(new Object[] {"testng-twoForks-ff1", null, props(2, 1, true), 5, 2, 0, 3, true});
54 args.add(new Object[] {"testng-twoForks-ff2", null, props(2, 2, true), 5, 2, 0, 2, true});
55 args.add(new Object[] {"testng-twoForks-ff2-tcp", null, props(2, 2, true), 5, 2, 0, 2, false});
56 args.add(new Object[] {"testng-oneFork-ff3", null, props(1, 3, true), 5, 2, 0, 0, true});
57 args.add(new Object[] {"testng-twoForks-ff3", null, props(2, 3, true), 5, 2, 0, 0, true});
58 args.add(new Object[] {"testng-twoForks-ff3-tcp", null, props(2, 3, true), 5, 2, 0, 0, false});
59 return args;
60 }
61
62 @Override
63 protected String withProvider() {
64 return "testng";
65 }
66 }