summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2018-04-05 17:48:43 +0200
committerGitHub <noreply@github.com>2018-04-05 17:48:43 +0200
commitc89efc910e1685fff335a08f3a45264638806771 (patch)
tree4b18419be99ea426c72e7905ec11f0feb722c6b5 /configserver
parent2c81e4e4a55cc8bd1eae4174b2ee415381bc7257 (diff)
parent7de818b34106ae4a9054c12f894b325451a3c779 (diff)
Merge pull request #5467 from vespa-engine/balder/quick-restart-of-slobrok
Balder/quick restart of slobrok
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/test/apps/app-jdisc-only-restart/hosts.xml7
-rw-r--r--configserver/src/test/apps/app-jdisc-only-restart/searchdefinitions/music.sd57
-rw-r--r--configserver/src/test/apps/app-jdisc-only-restart/services.xml29
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java4
4 files changed, 96 insertions, 1 deletions
diff --git a/configserver/src/test/apps/app-jdisc-only-restart/hosts.xml b/configserver/src/test/apps/app-jdisc-only-restart/hosts.xml
new file mode 100644
index 00000000000..f4256c9fc81
--- /dev/null
+++ b/configserver/src/test/apps/app-jdisc-only-restart/hosts.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<hosts>
+ <host name="mytesthost">
+ <alias>node1</alias>
+ </host>
+</hosts>
diff --git a/configserver/src/test/apps/app-jdisc-only-restart/searchdefinitions/music.sd b/configserver/src/test/apps/app-jdisc-only-restart/searchdefinitions/music.sd
new file mode 100644
index 00000000000..2e40523a6d9
--- /dev/null
+++ b/configserver/src/test/apps/app-jdisc-only-restart/searchdefinitions/music.sd
@@ -0,0 +1,57 @@
+# Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+# A basic search definition - called music, should be saved to music.sd
+search music {
+
+ # It contains one document type only - called music as well
+ document music {
+
+ field title type string {
+ indexing: summary | index # How this field should be indexed
+ # index-to: title, default # Create two indexes
+ weight: 75 # Ranking importancy of this field, used by the built in nativeRank feature
+ header
+ }
+
+ field artist type string {
+ indexing: summary | attribute | index
+ # index-to: artist, default
+
+ weight: 25
+ header
+ }
+
+ field year type int {
+ indexing: summary | attribute
+ header
+ }
+
+ # Increase query
+ field popularity type int {
+ indexing: summary | attribute
+ body
+ }
+
+ field url type uri {
+ indexing: summary | index
+ header
+ }
+
+ }
+
+ rank-profile default inherits default {
+ first-phase {
+ expression: nativeRank(title,artist) + attribute(popularity)
+ }
+
+ }
+
+ rank-profile textmatch inherits default {
+ first-phase {
+ expression: nativeRank(title,artist)
+ }
+
+ }
+
+
+
+}
diff --git a/configserver/src/test/apps/app-jdisc-only-restart/services.xml b/configserver/src/test/apps/app-jdisc-only-restart/services.xml
new file mode 100644
index 00000000000..b864ea206ef
--- /dev/null
+++ b/configserver/src/test/apps/app-jdisc-only-restart/services.xml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!-- Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
+<services version="1.0">
+
+ <admin version="2.0">
+ <adminserver hostalias="node1"/>
+ <slobroks>
+ <slobrok hostalias="node1" baseport="12345"/>
+ </slobroks>
+ </admin>
+
+ <jdisc version="1.0">
+ <document-processing compressdocuments="true">
+ <chain id="ContainerWrapperTest">
+ <documentprocessor id="com.yahoo.vespa.config.AppleDocProc"/>
+ </chain>
+ </document-processing>
+
+ <config name="project.specific">
+ <value>someval</value>
+ </config>
+
+ <nodes>
+ <node hostalias="node1" />
+ </nodes>
+
+ </jdisc>
+
+</services>
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java
index ecc3a8a0a54..0b7e9a78967 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/ApplicationRepositoryTest.java
@@ -33,6 +33,8 @@ public class ApplicationRepositoryTest {
private final static File testApp = new File("src/test/apps/app");
private final static File testAppJdiscOnly = new File("src/test/apps/app-jdisc-only");
+ private final static File testAppJdiscOnlyRestart = new File("src/test/apps/app-jdisc-only-restart");
+
private final static TenantName tenantName = TenantName.from("test");
private final static Clock clock = Clock.systemUTC();
@@ -63,7 +65,7 @@ public class ApplicationRepositoryTest {
@Test
public void prepareAndActivateWithRestart() throws IOException {
prepareAndActivateApp(testAppJdiscOnly);
- PrepareResult result = prepareAndActivateApp(testApp);
+ PrepareResult result = prepareAndActivateApp(testAppJdiscOnlyRestart);
assertTrue(result.configChangeActions().getRefeedActions().isEmpty());
assertFalse(result.configChangeActions().getRestartActions().isEmpty());
}