Skip to content

Commit

Permalink
Merge pull request #62 from zebrunner/develop
Browse files Browse the repository at this point in the history
1.9.11 rc
  • Loading branch information
SergeyBrenko authored Jun 26, 2024
2 parents daa2d98 + 78c954e commit b7a315f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,8 @@ private TestInvocationContext buildTestStartInvocationContext(ITestResult testRe
}

private void setZebrunnerTestIdOnRerun(ITestResult testResult, ITestNGMethod testMethod, TestStartDescriptor testStartDescriptor) {
if (RunContextHolder.isRerun()) {
// testMethod is not available for BeforeClass configuration method, so we just skip this logic in such case
if (RunContextHolder.isRerun() && testMethod != null) {
ITestContext context = testResult.getTestContext();
Object[] parameters = testResult.getParameters();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ private static RetryItemContext getOrInitRetryItemContext(ITestNGMethod method,
}

public static boolean isRetryFinished(ITestNGMethod method, ITestContext context) {
if (method == null) {
// method is not available for BeforeClass configuration method, so we just return true here
return true;
}
return getRetryContext(context)
.map(RetryContext::getRetryItemContexts)
.map(retryItemContext -> retryItemContext.get(method.getParameterInvocationCount()))
Expand Down

0 comments on commit b7a315f

Please sign in to comment.