summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHarald Musum <musum@verizonmedia.com>2020-08-04 10:05:57 +0200
committerHarald Musum <musum@verizonmedia.com>2020-08-04 10:05:57 +0200
commitb0a2c946c3ad8443c8be93158ab182d1b51f9237 (patch)
treebc16d05af88465f375bd5dabd3c00daf41b022d0 /configserver
parentc44a2ceb8d8206736cf09a078fa0ad717eec77e1 (diff)
Remove support for search definitions in docproc bundles
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/test/apps/zkfeed/components/defs-only.jarbin988 -> 0 bytes
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java39
2 files changed, 2 insertions, 37 deletions
diff --git a/configserver/src/test/apps/zkfeed/components/defs-only.jar b/configserver/src/test/apps/zkfeed/components/defs-only.jar
deleted file mode 100644
index 28f563cd779..00000000000
--- a/configserver/src/test/apps/zkfeed/components/defs-only.jar
+++ /dev/null
Binary files differ
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java
index a4fce5e37ba..5105f1b0d5f 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java
@@ -18,7 +18,6 @@ import com.yahoo.vespa.config.server.zookeeper.ConfigCurator;
import com.yahoo.vespa.config.server.zookeeper.ZKApplicationPackage;
import com.yahoo.vespa.curator.mock.MockCurator;
import org.junit.Before;
-import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
@@ -100,38 +99,18 @@ public class ZooKeeperClientTest {
String defsPath = appPath + ConfigCurator.DEFCONFIGS_ZK_SUBPATH;
assertTrue(zk.exists(appPath, ConfigCurator.DEFCONFIGS_ZK_SUBPATH.replaceFirst("/", "")));
List<String> children = zk.getChildren(defsPath);
- assertEquals(defsPath + " children", 2, children.size());
+ assertEquals(defsPath + " children", 1, children.size());
Collections.sort(children);
assertThat(children.get(0), is("a.b.test2"));
assertTrue(zk.exists(appPath, ConfigCurator.USER_DEFCONFIGS_ZK_SUBPATH.replaceFirst("/", "")));
String userDefsPath = appPath + ConfigCurator.USER_DEFCONFIGS_ZK_SUBPATH;
children = zk.getChildren(userDefsPath);
- assertThat(children.size(), is(2));
+ assertThat(children.size(), is(1));
Collections.sort(children);
assertThat(children.get(0), is("a.b.test2"));
}
- // TODO: Evaluate if we want this or not
- @Test
- @Ignore
- public void testFeedComponentsFileReferencesToZooKeeper() {
- final String appDir = "src/test/apps/app_sdbundles";
- ConfigCurator zk = ConfigCurator.create(new MockCurator());
- BaseDeployLogger logger = new BaseDeployLogger();
- Path app = Path.fromString("/1");
- ZooKeeperClient zooKeeperClient = new ZooKeeperClient(zk, logger, app);
- zooKeeperClient.setupZooKeeper();
-
- String currentAppPath = app.getAbsolute();
- assertTrue(zk.exists(currentAppPath, ConfigCurator.USERAPP_ZK_SUBPATH.replaceFirst("/", "")));
- assertTrue(zk.exists(currentAppPath + ConfigCurator.USERAPP_ZK_SUBPATH, "components"));
- assertTrue(zk.exists(currentAppPath + ConfigCurator.USERAPP_ZK_SUBPATH + "/components", "testbundle.jar"));
- assertTrue(zk.exists(currentAppPath + ConfigCurator.USERAPP_ZK_SUBPATH + "/components", "testbundle2.jar"));
- String data = zk.getData(currentAppPath + ConfigCurator.USERAPP_ZK_SUBPATH + "/components", "testbundle2.jar");
- assertThat(data, is(new File(appDir + "/components/testbundle2.jar").getAbsolutePath()));
- }
-
@Test
public void testFeedAppMetaDataToZooKeeper() {
assertTrue(zk.exists(appPath, ConfigCurator.META_ZK_PATH));
@@ -168,20 +147,6 @@ public class ZooKeeperClientTest {
assertTrue(zk.exists(appPath().append("search").append("chains").append("dir2").append("chain3.xml").getAbsolute()));
}
- @Test
- public void search_definitions_written_to_ZK() {
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("music.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("base.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("video.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("book.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("pc.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("laptop.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("product.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("sock.sd").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("foo.expression").getAbsolute()));
- assertTrue(zk.exists(appPath().append(ApplicationPackage.SEARCH_DEFINITIONS_DIR).append("bar.expression").getAbsolute()));
- }
-
private Path appPath() {
return Path.fromString(appPath).append(ConfigCurator.USERAPP_ZK_SUBPATH);
}