[testng] 32/160: Report retriable failures as SKIP
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:22:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag testng-6.9.5
in repository testng.
commit d1490f6989c77952b3b5056b5e03d0a883cdb2b7
Author: Ryan Schmitt <rschmitt at pobox.com>
Date: Sat May 30 17:28:09 2015 -0700
Report retriable failures as SKIP
---
src/main/java/org/testng/internal/Invoker.java | 23 +++++++++++------------
1 file changed, 11 insertions(+), 12 deletions(-)
diff --git a/src/main/java/org/testng/internal/Invoker.java b/src/main/java/org/testng/internal/Invoker.java
index abc75d0..d7ad276 100644
--- a/src/main/java/org/testng/internal/Invoker.java
+++ b/src/main/java/org/testng/internal/Invoker.java
@@ -1432,19 +1432,18 @@ public class Invoker implements IInvoker {
}
}
- testResult.setStatus(status);
+ IRetryAnalyzer retryAnalyzer = testMethod.getRetryAnalyzer();
+ boolean willRetry = retryAnalyzer != null && status == ITestResult.FAILURE && failure.instances != null && retryAnalyzer.retry(testResult);
- if (status == ITestResult.FAILURE && !handled) {
- handleException(ite, testMethod, testResult, failure.count++);
- status = testResult.getStatus();
- }
-
- if (status == ITestResult.FAILURE) {
- IRetryAnalyzer retryAnalyzer = testMethod.getRetryAnalyzer();
-
- if (retryAnalyzer != null && failure.instances != null && retryAnalyzer.retry(testResult)) {
- resultsToRetry.add(testResult);
- failure.instances.add(testResult.getInstance());
+ if (willRetry) {
+ resultsToRetry.add(testResult);
+ failure.instances.add(testResult.getInstance());
+ testResult.setStatus(ITestResult.SKIP);
+ } else {
+ testResult.setStatus(status);
+ if (status == ITestResult.FAILURE && !handled) {
+ handleException(ite, testMethod, testResult, failure.count++);
+ testResult.setStatus(status);
}
}
if (collectResults) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/testng.git
More information about the pkg-java-commits
mailing list