You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ca...@apache.org on 2016/05/25 05:33:15 UTC
[1/2] curator git commit: CURATOR-306 - Fixed up test case that was
broken as part of the addition of client schema validation.
Repository: curator
Updated Branches:
refs/heads/CURATOR-3.0 2357123ca -> bd0792376
CURATOR-306 - Fixed up test case that was broken as part of the addition of client schema validation.
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/ee2f1e22
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/ee2f1e22
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/ee2f1e22
Branch: refs/heads/CURATOR-3.0
Commit: ee2f1e222072f5e7ce4e7c17db0b4fff3a2e7408
Parents: 637a0eb
Author: Cam McKenzie <ca...@apache.org>
Authored: Wed May 25 15:30:29 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Wed May 25 15:30:29 2016 +1000
----------------------------------------------------------------------
.../framework/imps/TestFrameworkBackground.java | 25 ++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/curator/blob/ee2f1e22/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
----------------------------------------------------------------------
diff --git a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
index b9fd5c9..c62a299 100644
--- a/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
+++ b/curator-framework/src/test/java/org/apache/curator/framework/imps/TestFrameworkBackground.java
@@ -40,6 +40,8 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.testng.Assert;
import org.testng.annotations.Test;
+
+import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.CountDownLatch;
@@ -55,18 +57,37 @@ public class TestFrameworkBackground extends BaseClassForTests
@Test
public void testErrorListener() throws Exception
{
+ //The first call to the ACL provider will return a reasonable
+ //value. The second will throw an error. This is because the ACL
+ //provider is accessed prior to the backgrounding call.
+ final AtomicBoolean aclProviderCalled = new AtomicBoolean(false);
+
ACLProvider badAclProvider = new ACLProvider()
{
@Override
public List<ACL> getDefaultAcl()
{
- throw new UnsupportedOperationException();
+ if(aclProviderCalled.getAndSet(true))
+ {
+ throw new UnsupportedOperationException();
+ }
+ else
+ {
+ return new ArrayList<>();
+ }
}
@Override
public List<ACL> getAclForPath(String path)
{
- throw new UnsupportedOperationException();
+ if(aclProviderCalled.getAndSet(true))
+ {
+ throw new UnsupportedOperationException();
+ }
+ else
+ {
+ return new ArrayList<>();
+ }
}
};
CuratorFramework client = CuratorFrameworkFactory.builder()
[2/2] curator git commit: Merge branch 'CURATOR-306-fix' into
CURATOR-3.0
Posted by ca...@apache.org.
Merge branch 'CURATOR-306-fix' into CURATOR-3.0
Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/bd079237
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/bd079237
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/bd079237
Branch: refs/heads/CURATOR-3.0
Commit: bd0792376b80de02c7524cb913065543885586ab
Parents: 2357123 ee2f1e2
Author: Cam McKenzie <ca...@apache.org>
Authored: Wed May 25 15:32:52 2016 +1000
Committer: Cam McKenzie <ca...@apache.org>
Committed: Wed May 25 15:32:52 2016 +1000
----------------------------------------------------------------------
.../framework/imps/TestFrameworkBackground.java | 25 ++++++++++++++++++--
1 file changed, 23 insertions(+), 2 deletions(-)
----------------------------------------------------------------------