aboutsummaryrefslogtreecommitdiffstats
path: root/configserver/src/test
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2018-06-01 01:07:33 +0200
committerJon Bratseth <bratseth@oath.com>2018-06-01 01:07:33 +0200
commitf7d0fe5fdfad579e867f01acc1d41b2ec77bd785 (patch)
tree2c9b2241bf49a01cf84a6fc0e3dd221b08fb30fe /configserver/src/test
parent4919fb84be7edc03f7c7feb0080ff0c5f705f654 (diff)
Separate internal redeploys from application package changes
Separate system internal redeploys from application package changes such that we can ignore config updates originating from application package changes if restart on deploy is true, as the config change will be followed by a restart - but continue to effect config changes originating from internal system changes as those will not (and should not) be followed by a restart.
Diffstat (limited to 'configserver/src/test')
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/SuperModelRequestHandlerTest.java5
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationConvergenceCheckerTest.java9
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationMapperTest.java6
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationSetTest.java6
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationTest.java15
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/application/FileDistributionStatusTest.java8
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/deploy/ZooKeeperClientTest.java9
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/http/SessionHandlerTest.java6
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionActiveHandlerTest.java8
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactoryTest.java28
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/rpc/GetConfigProcessorTest.java3
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcServerTest.java8
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionFactoryTest.java12
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRepositoryTest.java9
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRequestHandlerTest.java21
15 files changed, 96 insertions, 57 deletions
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/SuperModelRequestHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/SuperModelRequestHandlerTest.java
index bc07ac7d79c..2b72db63d55 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/SuperModelRequestHandlerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/SuperModelRequestHandlerTest.java
@@ -122,12 +122,11 @@ public class SuperModelRequestHandlerTest {
}
private static class TestApplication extends Application {
- private long version = 0;
public TestApplication(VespaModel vespaModel, ServerCache cache, long appGeneration, ApplicationId app, long version) {
- super(vespaModel, cache, appGeneration, Version.fromIntValues(1, 2, 3), MetricUpdater.createTestUpdater(), app);
- this.version = version;
+ super(vespaModel, cache, appGeneration, false, Version.fromIntValues(1, 2, 3), MetricUpdater.createTestUpdater(), app);
}
+
}
public static NodeFlavors emptyNodeFlavors() {
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationConvergenceCheckerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationConvergenceCheckerTest.java
index 1d692e8f78f..3c3edae7914 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationConvergenceCheckerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationConvergenceCheckerTest.java
@@ -28,7 +28,7 @@ import static org.junit.Assert.assertThat;
import static com.yahoo.vespa.config.server.application.ApplicationConvergenceChecker.ServiceResponse;
/**
- * @author lulf
+ * @author Ulf Lilleengen
*/
public class ApplicationConvergenceCheckerTest {
@@ -43,7 +43,12 @@ public class ApplicationConvergenceCheckerTest {
@Before
public void setup() {
Model mockModel = MockModel.createContainer("localhost", 1337);
- application = new Application(mockModel, new ServerCache(), 3, Version.fromIntValues(0, 0, 0), MetricUpdater.createTestUpdater(), appId);
+ application = new Application(mockModel,
+ new ServerCache(),
+ 3,
+ false,
+ Version.fromIntValues(0, 0, 0),
+ MetricUpdater.createTestUpdater(), appId);
}
@Test
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationMapperTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationMapperTest.java
index a83f2676a4d..233c0e99ed8 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationMapperTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationMapperTest.java
@@ -31,9 +31,9 @@ public class ApplicationMapperTest {
vespaVersions.add(Version.fromString("1.2.3"));
vespaVersions.add(Version.fromString("1.2.4"));
vespaVersions.add(Version.fromString("1.2.5"));
- applications.add(new Application(new ModelStub(), null, 0, vespaVersions.get(0), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
- applications.add(new Application(new ModelStub(), null, 0, vespaVersions.get(1), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
- applications.add(new Application(new ModelStub(), null, 0, vespaVersions.get(2), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
+ applications.add(new Application(new ModelStub(), null, 0, false, vespaVersions.get(0), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
+ applications.add(new Application(new ModelStub(), null, 0, false, vespaVersions.get(1), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
+ applications.add(new Application(new ModelStub(), null, 0, false, vespaVersions.get(2), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
}
@Test
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationSetTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationSetTest.java
index 98bedb76599..94bb81021dc 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationSetTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationSetTest.java
@@ -29,9 +29,9 @@ public class ApplicationSetTest {
vespaVersions.add(Version.fromString("1.2.3"));
vespaVersions.add(Version.fromString("1.2.4"));
vespaVersions.add(Version.fromString("1.2.5"));
- applications.add(new Application(new ModelStub(), null, 0, vespaVersions.get(0), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
- applications.add(new Application(new ModelStub(), null, 0, vespaVersions.get(1), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
- applications.add(new Application(new ModelStub(), null, 0, vespaVersions.get(2), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
+ applications.add(new Application(new ModelStub(), null, 0, false, vespaVersions.get(0), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
+ applications.add(new Application(new ModelStub(), null, 0, false, vespaVersions.get(1), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
+ applications.add(new Application(new ModelStub(), null, 0, false, vespaVersions.get(2), MetricUpdater.createTestUpdater(), ApplicationId.defaultId()));
}
@Test
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationTest.java
index 02cf6303ba8..90a27c39736 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/ApplicationTest.java
@@ -42,8 +42,7 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
/**
- * @author lulf
- * @since 5.1.14
+ * @author Ulf Lilleengen
*/
public class ApplicationTest {
@@ -53,7 +52,7 @@ public class ApplicationTest {
ApplicationName.from("foobar"), InstanceName.defaultName());
ServerCache cache = new ServerCache();
Version vespaVersion = Version.fromIntValues(1, 2, 3);
- Application app = new Application(new ModelStub(), cache, 1337, vespaVersion, MetricUpdater.createTestUpdater(), appId);
+ Application app = new Application(new ModelStub(), cache, 1337L, false, vespaVersion, MetricUpdater.createTestUpdater(), appId);
assertThat(app.getApplicationGeneration(), is(1337l));
assertNotNull(app.getModel());
assertThat(app.getCache(), is(cache));
@@ -71,24 +70,24 @@ public class ApplicationTest {
File testApp = new File("src/test/apps/app");
ServerCache cache = createCacheAndAddContent();
VespaModel model = new VespaModel(FilesApplicationPackage.fromFile(testApp));
- final ApplicationId applicationId = new ApplicationId.Builder().tenant("foo").applicationName("foo").build();
- handler = new Application(model, cache, 1, Version.fromIntValues(1, 2, 3),
+ ApplicationId applicationId = new ApplicationId.Builder().tenant("foo").applicationName("foo").build();
+ handler = new Application(model, cache, 1L, false, Version.fromIntValues(1, 2, 3),
new MetricUpdater(Metrics.createTestMetrics(), Metrics.createDimensions(applicationId)), applicationId);
}
private static ServerCache createCacheAndAddContent() {
ServerCache cache = new ServerCache();
- final ConfigDefinitionKey key = new ConfigDefinitionKey(SimpletypesConfig.CONFIG_DEF_NAME, SimpletypesConfig.CONFIG_DEF_NAMESPACE);
+ ConfigDefinitionKey key = new ConfigDefinitionKey(SimpletypesConfig.CONFIG_DEF_NAME, SimpletypesConfig.CONFIG_DEF_NAMESPACE);
com.yahoo.vespa.config.buildergen.ConfigDefinition def = getDef(key, SimpletypesConfig.CONFIG_DEF_SCHEMA);
// TODO Why do we have to use empty def md5 here?
cache.addDef(key, def);
- final ConfigDefinitionKey key2 = new ConfigDefinitionKey(SlobroksConfig.CONFIG_DEF_NAME, SlobroksConfig.CONFIG_DEF_NAMESPACE);
+ ConfigDefinitionKey key2 = new ConfigDefinitionKey(SlobroksConfig.CONFIG_DEF_NAME, SlobroksConfig.CONFIG_DEF_NAMESPACE);
com.yahoo.vespa.config.buildergen.ConfigDefinition def2 = getDef(key2, SlobroksConfig.CONFIG_DEF_SCHEMA);
cache.addDef(key2, def2);
- final ConfigDefinitionKey key3 = new ConfigDefinitionKey(LogdConfig.CONFIG_DEF_NAME, LogdConfig.CONFIG_DEF_NAMESPACE);
+ ConfigDefinitionKey key3 = new ConfigDefinitionKey(LogdConfig.CONFIG_DEF_NAME, LogdConfig.CONFIG_DEF_NAMESPACE);
com.yahoo.vespa.config.buildergen.ConfigDefinition def3 = getDef(key3, LogdConfig.CONFIG_DEF_SCHEMA);
cache.addDef(key3, def3);
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/application/FileDistributionStatusTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/application/FileDistributionStatusTest.java
index 76204d5c5f2..c2ddec7e795 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/application/FileDistributionStatusTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/application/FileDistributionStatusTest.java
@@ -161,7 +161,13 @@ public class FileDistributionStatusTest {
private Application createApplication(List<String> hostnames) {
Model mockModel = MockModel.createConfigProxies(hostnames, 1337);
- return new Application(mockModel, new ServerCache(), 3, Version.fromIntValues(0, 0, 0), MetricUpdater.createTestUpdater(), appId);
+ return new Application(mockModel,
+ new ServerCache(),
+ 3,
+ false,
+ Version.fromIntValues(0, 0, 0),
+ MetricUpdater.createTestUpdater(),
+ appId);
}
HttpResponse getStatus(FileDistributionStatus fileDistributionStatus, Application application) {
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 bf7f7038c1a..8074dd35267 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
@@ -43,7 +43,14 @@ public class ZooKeeperClientTest extends TestWithCurator {
public void setupZK() throws IOException {
this.zk = ConfigCurator.create(curator);
ZooKeeperClient zkc = new ZooKeeperClient(zk, new BaseDeployLogger(), true, Path.fromString(appPath));
- ApplicationPackage app = FilesApplicationPackage.fromFileWithDeployData(new File("src/test/apps/zkfeed"), new DeployData("foo", "/bar/baz", "appName", 1345l, 3l, 2l));
+ ApplicationPackage app = FilesApplicationPackage.fromFileWithDeployData(new File("src/test/apps/zkfeed"),
+ new DeployData("foo",
+ "/bar/baz",
+ "appName",
+ 1345L,
+ false,
+ 3L,
+ 2L));
Map<Version, FileRegistry> fileRegistries = createFileRegistries();
app.writeMetaData();
zkc.setupZooKeeper();
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/SessionHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/SessionHandlerTest.java
index 930ae98c9e9..eb5dc7a2abf 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/SessionHandlerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/SessionHandlerTest.java
@@ -191,7 +191,8 @@ public class SessionHandlerTest {
public String applicationName;
@Override
- public LocalSession createSession(File applicationDirectory, ApplicationId applicationId, TimeoutBudget timeoutBudget) {
+ public LocalSession createSession(File applicationDirectory, ApplicationId applicationId,
+ TimeoutBudget timeoutBudget) {
createCalled = true;
this.applicationName = applicationId.application().value();
if (doThrow) {
@@ -208,7 +209,8 @@ public class SessionHandlerTest {
}
@Override
- public LocalSession createSessionFromExisting(LocalSession existingSession, DeployLogger logger, TimeoutBudget timeoutBudget) {
+ public LocalSession createSessionFromExisting(LocalSession existingSession, DeployLogger logger,
+ boolean internalRedeploy, TimeoutBudget timeoutBudget) {
if (doThrow) {
throw new RuntimeException("foo");
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionActiveHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionActiveHandlerTest.java
index e14e59b9fe7..2a05688c435 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionActiveHandlerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/http/v2/SessionActiveHandlerTest.java
@@ -280,7 +280,13 @@ public class SessionActiveHandlerTest extends SessionHandlerTest {
ActivateRequest(long sessionId, long previousSessionId, Session.Status initialStatus, String subPath, Clock clock) {
this.sessionId = sessionId;
this.initialStatus = initialStatus;
- this.deployData = new DeployData("foo", "bar", appName, 0l, sessionId, previousSessionId);
+ this.deployData = new DeployData("foo",
+ "bar",
+ appName,
+ 0l,
+ false,
+ sessionId,
+ previousSessionId);
this.subPath = subPath;
this.clock = clock;
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactoryTest.java
index 9193c2409c7..7c1d5fa8dbc 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactoryTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/ConfigResponseFactoryTest.java
@@ -13,38 +13,38 @@ import org.junit.Test;
import java.io.StringReader;
-import static org.hamcrest.core.Is.is;
-import static org.junit.Assert.assertThat;
+import static org.junit.Assert.assertEquals;
/**
- * @author lulf
- * @since 5.19
+ * @author Ulf Lilleengen
*/
public class ConfigResponseFactoryTest {
- private InnerCNode def;
+ private InnerCNode def;
@Before
public void setup() {
- DefParser dParser = new DefParser(SimpletypesConfig.getDefName(), new StringReader(StringUtilities.implode(SimpletypesConfig.CONFIG_DEF_SCHEMA, "\n")));
+ DefParser dParser = new DefParser(SimpletypesConfig.getDefName(),
+ new StringReader(StringUtilities.implode(SimpletypesConfig.CONFIG_DEF_SCHEMA, "\n")));
def = dParser.getTree();
}
@Test
public void testUncompressedFacory() {
UncompressedConfigResponseFactory responseFactory = new UncompressedConfigResponseFactory();
- ConfigResponse response = responseFactory.createResponse(ConfigPayload.empty(), def, 3);
- assertThat(response.getCompressionInfo().getCompressionType(), is(CompressionType.UNCOMPRESSED));
- assertThat(response.getGeneration(), is(3l));
- assertThat(response.getPayload().getByteLength(), is(2));
+ ConfigResponse response = responseFactory.createResponse(ConfigPayload.empty(), def, 3, false);
+ assertEquals(CompressionType.UNCOMPRESSED, response.getCompressionInfo().getCompressionType());
+ assertEquals(3L,response.getGeneration());
+ assertEquals(2, response.getPayload().getByteLength());
}
@Test
public void testLZ4CompressedFacory() {
LZ4ConfigResponseFactory responseFactory = new LZ4ConfigResponseFactory();
- ConfigResponse response = responseFactory.createResponse(ConfigPayload.empty(), def, 3);
- assertThat(response.getCompressionInfo().getCompressionType(), is(CompressionType.LZ4));
- assertThat(response.getGeneration(), is(3l));
- assertThat(response.getPayload().getByteLength(), is(3));
+ ConfigResponse response = responseFactory.createResponse(ConfigPayload.empty(), def, 3, false);
+ assertEquals(CompressionType.LZ4, response.getCompressionInfo().getCompressionType());
+ assertEquals(3L, response.getGeneration());
+ assertEquals(3, response.getPayload().getByteLength());
}
+
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/GetConfigProcessorTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/GetConfigProcessorTest.java
index 578224833a1..50c39b74fa2 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/GetConfigProcessorTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/GetConfigProcessorTest.java
@@ -104,6 +104,9 @@ public class GetConfigProcessorTest {
}
@Override
+ public boolean isInternalRedeploy() { return false; }
+
+ @Override
public String getConfigMd5() {
return "mymd5";
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcServerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcServerTest.java
index ef742ae3d38..6bb566963c0 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcServerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/RpcServerTest.java
@@ -73,7 +73,13 @@ public class RpcServerTest extends TestWithRpc {
private void testEnabled() throws IOException, SAXException {
generationCounter.increment();
- Application app = new Application(new VespaModel(MockApplicationPackage.createEmpty()), new ServerCache(), 2l, Version.fromIntValues(1, 2, 3), MetricUpdater.createTestUpdater(), ApplicationId.defaultId());
+ Application app = new Application(new VespaModel(MockApplicationPackage.createEmpty()),
+ new ServerCache(),
+ 2L,
+ false,
+ Version.fromIntValues(1, 2, 3),
+ MetricUpdater.createTestUpdater(),
+ ApplicationId.defaultId());
ApplicationSet appSet = ApplicationSet.fromSingle(app);
rpcServer.configActivated(TenantName.defaultName(), appSet);
ConfigKey<?> key = new ConfigKey<>(LbServicesConfig.class, "*");
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionFactoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionFactoryTest.java
index 531a2e3745b..0ca487cfb67 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionFactoryTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionFactoryTest.java
@@ -31,8 +31,7 @@ import static org.junit.Assert.assertThat;
import static org.junit.Assert.assertTrue;
/**
- * @author lulf
- * @since 5.1
+ * @author Ulf Lilleengen
*/
public class SessionFactoryTest extends TestWithTenant {
private SessionFactory factory;
@@ -64,10 +63,13 @@ public class SessionFactoryTest extends TestWithTenant {
public void require_that_session_can_be_created_from_existing() throws IOException {
LocalSession session = getLocalSession();
assertNotNull(session);
- assertThat(session.getSessionId(), is(2l));
- LocalSession session2 = factory.createSessionFromExisting(session, new BaseDeployLogger(), TimeoutBudgetTest.day());
+ assertThat(session.getSessionId(), is(2L));
+ LocalSession session2 = factory.createSessionFromExisting(session,
+ new BaseDeployLogger(),
+ false,
+ TimeoutBudgetTest.day());
assertNotNull(session2);
- assertThat(session2.getSessionId(), is(3l));
+ assertThat(session2.getSessionId(), is(3L));
}
@Test(expected = RuntimeException.class)
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRepositoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRepositoryTest.java
index 9a4b0b05186..f47ed69ad14 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRepositoryTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRepositoryTest.java
@@ -65,8 +65,13 @@ public class TenantRepositoryTest extends TestWithCurator {
@Test
public void testListenersAdded() throws IOException, SAXException {
tenantRepository.getTenant(tenant1).getReloadHandler().reloadConfig(ApplicationSet.fromSingle(
- new Application(new VespaModel(MockApplicationPackage.createEmpty()), new ServerCache(), 4l,
- Version.fromIntValues(1, 2, 3), MetricUpdater.createTestUpdater(), ApplicationId.defaultId())));
+ new Application(new VespaModel(MockApplicationPackage.createEmpty()),
+ new ServerCache(),
+ 4L,
+ false,
+ Version.fromIntValues(1, 2, 3),
+ MetricUpdater.createTestUpdater(),
+ ApplicationId.defaultId())));
assertThat(listener.reloaded.get(), is(1));
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRequestHandlerTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRequestHandlerTest.java
index ef320f0f084..27ae0945b4a 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRequestHandlerTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRequestHandlerTest.java
@@ -54,8 +54,7 @@ import static org.hamcrest.core.Is.is;
import static org.junit.Assert.*;
/**
- * @author lulf
- * @since 5.1
+ * @author Ulf Lilleengen
*/
public class TenantRequestHandlerTest extends TestWithCurator {
@@ -263,7 +262,8 @@ public class TenantRequestHandlerTest extends TestWithCurator {
public void testHasApplication() throws IOException, SAXException {
assertdefaultAppNotFound();
server.reloadConfig(reloadConfig(1l, Clock.systemUTC()));
- assertTrue(server.hasApplication(new ApplicationId.Builder().applicationName(ApplicationName.defaultName()).tenant(tenant).build(), Optional.of(vespaVersion)));
+ assertTrue(server.hasApplication(new ApplicationId.Builder().applicationName(ApplicationName.defaultName()).tenant(tenant).build(),
+ Optional.of(vespaVersion)));
}
private void assertdefaultAppNotFound() {
@@ -286,18 +286,17 @@ public class TenantRequestHandlerTest extends TestWithCurator {
@Test
public void testListConfigs() throws IOException, SAXException {
assertdefaultAppNotFound();
- /*assertTrue(server.allConfigIds(ApplicationId.defaultId()).isEmpty());
- assertTrue(server.allConfigsProduced(ApplicationId.defaultId()).isEmpty());
- assertTrue(server.listConfigs(ApplicationId.defaultId(), false).isEmpty());
- assertTrue(server.listConfigs(ApplicationId.defaultId(), true).isEmpty());*/
VespaModel model = new VespaModel(FilesApplicationPackage.fromFile(new File("src/test/apps/app")));
- server.reloadConfig(ApplicationSet.fromSingle(new Application(model, new ServerCache(), 1, vespaVersion, MetricUpdater.createTestUpdater(), ApplicationId.defaultId())));
+ server.reloadConfig(ApplicationSet.fromSingle(new Application(model,
+ new ServerCache(),
+ 1,
+ false,
+ vespaVersion,
+ MetricUpdater.createTestUpdater(),
+ ApplicationId.defaultId())));
Set<ConfigKey<?>> configNames = server.listConfigs(ApplicationId.defaultId(), Optional.of(vespaVersion), false);
assertTrue(configNames.contains(new ConfigKey<>("sentinel", "hosts", "cloud.config")));
- //for (ConfigKey<?> ck : configNames) {
- // assertTrue(!"".equals(ck.getConfigId()));
- //}
configNames = server.listConfigs(ApplicationId.defaultId(), Optional.of(vespaVersion), true);
System.out.println(configNames);