-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CURATOR-728: Not issue ZooKeeper::create if possible in ZkPaths::mkdirs #518
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,6 +47,7 @@ | |
import org.apache.zookeeper.ZooDefs; | ||
import org.apache.zookeeper.data.ACL; | ||
import org.apache.zookeeper.data.Stat; | ||
import org.junit.jupiter.api.Tag; | ||
import org.junit.jupiter.api.Test; | ||
|
||
public class TestCreate extends BaseClassForTests { | ||
|
@@ -684,6 +685,7 @@ public void testProtectedUtils() throws Exception { | |
* but just to the first ancestor parent. (See https://issues.apache.org/jira/browse/ZOOKEEPER-2590) | ||
*/ | ||
@Test | ||
@Tag("ZOOKEEPER-2590") | ||
public void testForbiddenAncestors() throws Exception { | ||
CuratorFramework client = createClient(testACLProvider); | ||
try { | ||
|
@@ -696,9 +698,10 @@ public void testForbiddenAncestors() throws Exception { | |
|
||
// In creation attempts where the parent ("/bat") has ACL that restricts read, creation request fails. | ||
try { | ||
client.create().creatingParentsIfNeeded().forPath("/bat/bost"); | ||
client.create().creatingParentsIfNeeded().forPath("/bat/foo/bost"); | ||
fail("Expected NoAuthException when not authorized to read new node grandparent"); | ||
} catch (KeeperException.NoAuthException noAuthException) { | ||
assertEquals(noAuthException.getPath(), "/bat"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The old test reported |
||
} | ||
|
||
// But creating a node in the same subtree where its grandparent has read access is allowed and | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -224,7 +224,7 @@ | |
<dependency>org.apache.curator:curator-recipes</dependency> | ||
<dependency>org.apache.curator:curator-client</dependency> | ||
</dependenciesToScan> | ||
<excludedGroups>master</excludedGroups> | ||
<excludedGroups>master,ZOOKEEPER-2590</excludedGroups> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ZOOKEEPER-2590 is never landed in 3.7 though it is tagged with 3.7.3. |
||
</configuration> | ||
</plugin> | ||
</plugins> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,7 +31,7 @@ | |
<artifactId>curator-test-zk38</artifactId> | ||
|
||
<properties> | ||
<zookeeper-38-version>3.8.3</zookeeper-38-version> | ||
<zookeeper-38-version>3.8.4</zookeeper-38-version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ZOOKEEPER-2590 is landed in 3.8.4. |
||
</properties> | ||
|
||
<dependencies> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Params are by default not be mutated. I suppose we don't need final to params.