Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
909e179
commit f81932a
Showing
3 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
testng-core/src/test/java/test/dataprovider/issue2819/TestClassFailingRetrySample.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package test.dataprovider.issue2819; | ||
|
||
import org.testng.IDataProviderMethod; | ||
import org.testng.IRetryDataProvider; | ||
import org.testng.annotations.DataProvider; | ||
import org.testng.annotations.Test; | ||
|
||
public class TestClassFailingRetrySample { | ||
|
||
@Test(dataProvider = "dp") | ||
public void testMethod(int ignored) {} | ||
|
||
@DataProvider(name = "dp", retryUsing = DonotRetry.class) | ||
public Object[][] getData() { | ||
throw new RuntimeException("problem"); | ||
} | ||
|
||
public static class DonotRetry implements IRetryDataProvider { | ||
|
||
@Override | ||
public boolean retry(IDataProviderMethod dataProvider) { | ||
return false; | ||
} | ||
} | ||
} |