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