[testng] 75/160: Fix SkipAndExpectedTest

Eugene Zhukov eugene-guest at moszumanska.debian.org
Tue Aug 18 10:22:23 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 ff9fa277e813279aa017435a3ef254d55d247183
Author: Julien Herr <julien.herr at alcatel-lucent.com>
Date:   Thu Jun 4 13:26:56 2015 +0200

    Fix SkipAndExpectedTest
---
 src/main/java/org/testng/internal/Invoker.java | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/testng/internal/Invoker.java b/src/main/java/org/testng/internal/Invoker.java
index d44d6fe..9660043 100644
--- a/src/main/java/org/testng/internal/Invoker.java
+++ b/src/main/java/org/testng/internal/Invoker.java
@@ -1368,12 +1368,13 @@ public class Invoker implements IInvoker {
       // Exception thrown?
       if (ite != null) {
 
+        if (isSkipExceptionAndSkip(ite)){
+          status = ITestResult.SKIP;
+        }
         //  Invocation caused an exception, see if the method was annotated with @ExpectedException
-        if (expectedExceptionsHolder != null && !expectedExceptionsHolder.isExpectedException(ite)) {
+        else if (expectedExceptionsHolder != null && !expectedExceptionsHolder.isExpectedException(ite)) {
           testResult.setThrowable(expectedExceptionsHolder.wrongException(ite));
           status= ITestResult.FAILURE;
-        } else if (isSkipExceptionAndSkip(ite)){
-          status = ITestResult.SKIP;
         } else if (expectedExceptionsHolder == null) {
           handleException(ite, testMethod, testResult, failure.count++);
           handled = true;

-- 
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