[testng] 96/355: Invoker: minor in handleInvocationResults method
Eugene Zhukov
eugene-guest at moszumanska.debian.org
Tue Aug 18 10:19:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
eugene-guest pushed a commit to annotated tag OpenBSD
in repository testng.
commit c8d9788a0187e3920066e07965e0139c983384e7
Author: Vladislav Rassokhin <vladrassokhin at gmail.com>
Date: Sun Nov 23 01:55:28 2014 +0300
Invoker: minor in handleInvocationResults method
---
src/main/java/org/testng/internal/Invoker.java | 28 +++-----------------------
1 file changed, 3 insertions(+), 25 deletions(-)
diff --git a/src/main/java/org/testng/internal/Invoker.java b/src/main/java/org/testng/internal/Invoker.java
index a40e94f..002f15d 100644
--- a/src/main/java/org/testng/internal/Invoker.java
+++ b/src/main/java/org/testng/internal/Invoker.java
@@ -1476,39 +1476,17 @@ public class Invoker implements IInvoker {
testResult.setStatus(status);
- boolean retry = false;
-
if (testResult.getStatus() == ITestResult.FAILURE) {
IRetryAnalyzer retryAnalyzer = testMethod.getRetryAnalyzer();
- if (retryAnalyzer != null && failedInstances != null) {
- retry = retryAnalyzer.retry(testResult);
- }
-
- if (retry) {
+ if (retryAnalyzer != null && failedInstances != null && retryAnalyzer.retry(testResult)) {
resultsToRetry.add(testResult);
- if (failedInstances != null) {
- failedInstances.add(testResult.getInstance());
- }
+ failedInstances.add(testResult.getInstance());
}
}
if (collectResults) {
// Collect the results
- if(ITestResult.SUCCESS == status) {
- m_notifier.addPassedTest(testMethod, testResult);
- }
- else if(ITestResult.SKIP == status) {
- m_notifier.addSkippedTest(testMethod, testResult);
- }
- else if(ITestResult.FAILURE == status) {
- m_notifier.addFailedTest(testMethod, testResult);
- }
- else if(ITestResult.SUCCESS_PERCENTAGE_FAILURE == status) {
- m_notifier.addFailedButWithinSuccessPercentageTest(testMethod, testResult);
- }
- else {
- assert false : "UNKNOWN STATUS:" + status;
- }
+ collectResults(testMethod, Collections.singleton(testResult));
// if (triggerListeners && status != ITestResult.SUCCESS) {
// runTestListeners(testResult);
// }
--
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