diff options
author | Harald Musum <musum@verizonmedia.com> | 2021-07-08 22:22:07 +0200 |
---|---|---|
committer | Harald Musum <musum@verizonmedia.com> | 2021-07-08 22:22:07 +0200 |
commit | 9e4889d949f2b7b8163e22ed8b08a6804f728fd2 (patch) | |
tree | 7a3436b258c89628b4e91f8956f294c64ed34c90 /configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java | |
parent | 3c06371c9393e9c2ebae773c350737db7c540f89 (diff) |
Use Curator instead of ConfigCurator, part 2
Diffstat (limited to 'configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java')
-rw-r--r-- | configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java index a34c17dc909..c452e1cf0f3 100644 --- a/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java +++ b/configserver/src/test/java/com/yahoo/vespa/config/server/zookeeper/ZKApplicationFileTest.java @@ -1,9 +1,10 @@ -// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.config.server.zookeeper; import com.yahoo.config.application.api.ApplicationFile; import com.yahoo.config.application.api.ApplicationFileTest; import com.yahoo.path.Path; +import com.yahoo.text.Utf8; import com.yahoo.vespa.curator.mock.MockCurator; import org.junit.Rule; import org.junit.rules.TemporaryFolder; @@ -11,6 +12,7 @@ import org.junit.rules.TemporaryFolder; import java.io.File; import java.io.IOException; +import static com.yahoo.vespa.config.server.zookeeper.ConfigCurator.USERAPP_ZK_SUBPATH; import static org.junit.Assert.assertTrue; /** @@ -23,9 +25,9 @@ public class ZKApplicationFileTest extends ApplicationFileTest { private void feed(ConfigCurator zk, File dirToFeed) { assertTrue(dirToFeed.isDirectory()); - String appPath = "/0"; - ZKApplicationPackageTest.feedZooKeeper(zk, dirToFeed, appPath + ConfigCurator.USERAPP_ZK_SUBPATH, null, true); - zk.putData(appPath, ZKApplicationPackage.fileRegistryNode, "dummyfiles"); + Path appPath = Path.fromString("/0"); + ZKApplicationPackageTest.feedZooKeeper(zk.curator(), dirToFeed, appPath.append(USERAPP_ZK_SUBPATH), null, true); + zk.curator().set(appPath.append(ZKApplicationPackage.fileRegistryNode), Utf8.toBytes("dummyfiles")); } @Override |