You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by dr...@apache.org on 2017/05/02 20:06:25 UTC
[17/50] curator git commit: use latest TestNg which fixes retry
listener issues
use latest TestNg which fixes retry listener issues
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/f6451907
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/f6451907
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/f6451907
Branch: refs/heads/master
Commit: f645190739cb8c26a19fba1d469faef8966db418
Parents: acd9097
Author: randgalt <ra...@apache.org>
Authored: Wed Jan 11 19:10:15 2017 -0500
Committer: randgalt <ra...@apache.org>
Committed: Wed Jan 11 19:10:15 2017 -0500
----------------------------------------------------------------------
.../curator/framework/recipes/leader/TestLeaderSelector.java | 2 +-
.../recipes/leader/TestLeaderSelectorParticipants.java | 2 +-
.../main/java/org/apache/curator/test/BaseClassForTests.java | 6 +-----
pom.xml | 2 +-
4 files changed, 4 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/f6451907/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
index e9a7002..c1622ba 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelector.java
@@ -21,6 +21,7 @@ package org.apache.curator.framework.recipes.leader;
import com.google.common.collect.Lists;
import com.google.common.collect.Queues;
+import com.google.common.collect.Sets;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.framework.state.ConnectionState;
@@ -35,7 +36,6 @@ import org.apache.curator.test.Timing;
import org.apache.curator.utils.CloseableUtils;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.testng.internal.annotations.Sets;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
http://git-wip-us.apache.org/repos/asf/curator/blob/f6451907/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
----------------------------------------------------------------------
diff --git a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
index d7329ab..e026f87 100644
--- a/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
+++ b/curator-recipes/src/test/java/org/apache/curator/framework/recipes/leader/TestLeaderSelectorParticipants.java
@@ -19,6 +19,7 @@
package org.apache.curator.framework.recipes.leader;
import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
import org.apache.curator.test.BaseClassForTests;
import org.apache.curator.utils.CloseableUtils;
import org.apache.curator.framework.CuratorFramework;
@@ -27,7 +28,6 @@ import org.apache.curator.framework.state.ConnectionState;
import org.apache.curator.retry.RetryOneTime;
import org.testng.Assert;
import org.testng.annotations.Test;
-import org.testng.internal.annotations.Sets;
import java.util.Collection;
import java.util.List;
import java.util.Set;
http://git-wip-us.apache.org/repos/asf/curator/blob/f6451907/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
----------------------------------------------------------------------
diff --git a/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java b/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
index fe4acd2..5114552 100644
--- a/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
+++ b/curator-test/src/main/java/org/apache/curator/test/BaseClassForTests.java
@@ -203,7 +203,6 @@ public class BaseClassForTests
{
if ( method.getTestMethod().isBeforeMethodConfiguration() )
{
- TestListenerAdapter x = null;
RetryContext retryContext = (RetryContext)context.getAttribute(ATTRIBUTE_NAME);
if ( retryContext == null )
{
@@ -244,12 +243,9 @@ public class BaseClassForTests
else
{
System.clearProperty("curator-use-classic-connection-handling");
- if ( testResult.isSuccess() )
+ if ( testResult.isSuccess() || (testResult.getStatus() == ITestResult.FAILURE) )
{
retryContext.isRetrying.set(false);
- }
- if ( testResult.isSuccess() || retryContext.isRetrying.get() )
- {
if ( retryContext.runVersion.incrementAndGet() > 1 )
{
context.setAttribute(ATTRIBUTE_NAME, null);
http://git-wip-us.apache.org/repos/asf/curator/blob/f6451907/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index f327806..42b9265 100644
--- a/pom.xml
+++ b/pom.xml
@@ -74,7 +74,7 @@
<scannotation-version>1.0.2</scannotation-version>
<resteasy-jaxrs-version>2.3.0.GA</resteasy-jaxrs-version>
<guava-version>16.0.1</guava-version>
- <testng-version>6.8.8</testng-version>
+ <testng-version>6.10</testng-version>
<swift-version>0.12.0</swift-version>
<dropwizard-version>0.7.0</dropwizard-version>
<maven-shade-plugin-version>2.3</maven-shade-plugin-version>