You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ed...@apache.org on 2022/10/18 20:31:34 UTC
[accumulo] branch main updated: fix ZooBasedConfigIT for config node changes (#3030)
This is an automated email from the ASF dual-hosted git repository.
edcoleman pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/accumulo.git
The following commit(s) were added to refs/heads/main by this push:
new 78142d74f3 fix ZooBasedConfigIT for config node changes (#3030)
78142d74f3 is described below
commit 78142d74f3ed1a23a374f5bd5fdbd7f245a16721
Author: EdColeman <de...@etcoleman.com>
AuthorDate: Tue Oct 18 16:31:27 2022 -0400
fix ZooBasedConfigIT for config node changes (#3030)
---
.../accumulo/test/conf/store/ZooBasedConfigIT.java | 19 +++++++------------
1 file changed, 7 insertions(+), 12 deletions(-)
diff --git a/test/src/main/java/org/apache/accumulo/test/conf/store/ZooBasedConfigIT.java b/test/src/main/java/org/apache/accumulo/test/conf/store/ZooBasedConfigIT.java
index f68d9f25fb..0862fbc3e3 100644
--- a/test/src/main/java/org/apache/accumulo/test/conf/store/ZooBasedConfigIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/conf/store/ZooBasedConfigIT.java
@@ -116,30 +116,22 @@ public class ZooBasedConfigIT {
@BeforeEach
public void initPaths() {
context = createMock(ServerContext.class);
- testZk.initPaths(ZooUtil.getRoot(INSTANCE_ID) + Constants.ZCONFIG);
+ testZk.initPaths(ZooUtil.getRoot(INSTANCE_ID));
try {
zooKeeper.create(ZooUtil.getRoot(INSTANCE_ID) + Constants.ZTABLES, new byte[0],
ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+
zooKeeper.create(ZooUtil.getRoot(INSTANCE_ID) + Constants.ZTABLES + "/" + tidA.canonical(),
new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
- zooKeeper.create(
- ZooUtil.getRoot(INSTANCE_ID) + Constants.ZTABLES + "/" + tidA.canonical() + "/conf",
- new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
-
zooKeeper.create(ZooUtil.getRoot(INSTANCE_ID) + Constants.ZTABLES + "/" + tidB.canonical(),
new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
- zooKeeper.create(
- ZooUtil.getRoot(INSTANCE_ID) + Constants.ZTABLES + "/" + tidB.canonical() + "/conf",
- new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+
zooKeeper.create(ZooUtil.getRoot(INSTANCE_ID) + Constants.ZNAMESPACES, new byte[0],
ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
zooKeeper.create(
ZooUtil.getRoot(INSTANCE_ID) + Constants.ZNAMESPACES + "/" + nsId.canonical(),
new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
- zooKeeper.create(
- ZooUtil.getRoot(INSTANCE_ID) + Constants.ZNAMESPACES + "/" + nsId.canonical() + "/conf",
- new byte[0], ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
} catch (KeeperException ex) {
log.trace("Issue during zk initialization, skipping", ex);
@@ -191,8 +183,11 @@ public class ZooBasedConfigIT {
* node should be created.
*/
@Test
- public void upgradeSysTestNoProps() {
+ public void upgradeSysTestNoProps() throws Exception {
replay(context);
+ // force create empty sys config node.
+ zooKeeper.create(ZooUtil.getRoot(INSTANCE_ID) + Constants.ZCONFIG, new byte[0],
+ ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
var propKey = SystemPropKey.of(INSTANCE_ID);
ZooBasedConfiguration zbc = new SystemConfiguration(context, propKey, parent);
assertNotNull(zbc);