View Javadoc
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  /**
24   * Test class for SUREFIRE-580, configuration parameter {@code skipAfterFailureCount}.
25   *
26   * @author <a href="mailto:tibordigana@apache.org">Tibor Digana (tibor17)</a>
27   * @since 2.19
28   */
29  public class FailFastTestNgIT extends AbstractFailFastIT {
30  
31      @SuppressWarnings("checkstyle:linelength")
32      static Iterable<Object[]> data() {
33          /**
34           * reuseForks=false is not used because of race conditions and unpredictable commands received by
35           * MasterProcessReader, this feature has significant limitation.
36           */
37          ArrayList<Object[]> args = new ArrayList<>();
38          //                        description
39          //                                             profile
40          //                                                       forkCount,
41          //                                                       fail-fast-count,
42          //                                                       reuseForks
43          //                                                                               total
44          //                                                                                    failures
45          //                                                                                            errors
46          //                                                                                                  skipped
47          //                                                                                                        pipes
48          // Too flaky
49          // args.add(new Object[] {"testng-oneFork-ff1", null, props(1, 1, true), 5, 0, 1, 4, true});
50          // FIXME why failing and so flaky?
51          // args.add(new Object[] {"testng-oneFork-ff2", null, props(1, 2, true), 5, 0, 2, 2, true});
52          args.add(new Object[] {"testng-twoForks-ff1", null, props(2, 1, true), 5, 0, 2, 3, true});
53          args.add(new Object[] {"testng-twoForks-ff2", null, props(2, 2, true), 5, 0, 2, 2, true});
54          args.add(new Object[] {"testng-oneFork-ff3", null, props(1, 3, true), 5, 0, 2, 0, true});
55          args.add(new Object[] {"testng-twoForks-ff3", null, props(2, 3, true), 5, 0, 2, 0, true});
56  
57          return args;
58      }
59  
60      @Override
61      protected String withProvider() {
62          return "testng";
63      }
64  }