summaryrefslogtreecommitdiffstats
path: root/configserver/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorgjoranv <gv@yahoo-inc.com>2017-04-07 00:08:55 +0200
committergjoranv <gv@yahoo-inc.com>2017-04-07 00:10:39 +0200
commit33557623a37be6c5b90366d19a7dfabb69b1f3ec (patch)
tree91d7f47a622f47022be5dba1df23feda25cf40e4 /configserver/src/test/java/com/yahoo
parent6f115c7bbd7fc1890795fbc2c5ab4f8080b479dd (diff)
Add necessary Flavor arguments to ctor calls.
Diffstat (limited to 'configserver/src/test/java/com/yahoo')
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/SuperModelRequestHandlerTest.java12
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/TestComponentRegistry.java5
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/rpc/TestWithRpc.java4
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/tenant/TenantRequestHandlerTest.java15
4 files changed, 29 insertions, 7 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 a2b0b4e7d22..9bf86b4aa0a 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
@@ -3,7 +3,9 @@ package com.yahoo.vespa.config.server;
import com.yahoo.cloud.config.ConfigserverConfig;
import com.yahoo.config.model.application.provider.FilesApplicationPackage;
+import com.yahoo.config.provision.NodeFlavors;
import com.yahoo.config.provision.Version;
+import com.yahoo.config.provisioning.FlavorsConfig;
import com.yahoo.vespa.config.server.application.Application;
import com.yahoo.config.provision.ApplicationId;
import com.yahoo.config.provision.TenantName;
@@ -43,7 +45,8 @@ public class SuperModelRequestHandlerTest {
counter = new SuperModelGenerationCounter(new MockCurator());
controller = new SuperModelRequestHandler(counter,
new TestConfigDefinitionRepo(),
- new ConfigserverConfig(new ConfigserverConfig.Builder()));
+ new ConfigserverConfig(new ConfigserverConfig.Builder()),
+ emptyNodeFlavors());
}
@Test
@@ -94,7 +97,8 @@ public class SuperModelRequestHandlerTest {
long masterGen = 10;
controller = new SuperModelRequestHandler(counter,
new TestConfigDefinitionRepo(),
- new ConfigserverConfig(new ConfigserverConfig.Builder().masterGeneration(masterGen)));
+ new ConfigserverConfig(new ConfigserverConfig.Builder().masterGeneration(masterGen)),
+ emptyNodeFlavors());
long gen = counter.increment();
controller.reloadConfig(tenantA, createApp(tenantA, "foo", 3L, 1));
@@ -127,4 +131,8 @@ public class SuperModelRequestHandlerTest {
}
}
+ public static NodeFlavors emptyNodeFlavors() {
+ return new NodeFlavors(new FlavorsConfig(new FlavorsConfig.Builder()));
+ }
+
}
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/TestComponentRegistry.java b/configserver/src/test/java/com/yahoo/vespa/config/server/TestComponentRegistry.java
index efd8b2f843b..87f94fc4d1d 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/TestComponentRegistry.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/TestComponentRegistry.java
@@ -26,6 +26,8 @@ import com.yahoo.vespa.model.VespaModelFactory;
import java.util.Collections;
import java.util.Optional;
+import static com.yahoo.vespa.config.server.SuperModelRequestHandlerTest.emptyNodeFlavors;
+
/**
* @author lulf
* @since 5.1
@@ -141,7 +143,8 @@ public class TestComponentRegistry implements GlobalComponentRegistry {
HostProvisionerProvider.empty();
SessionPreparer sessionPreparer = new SessionPreparer(modelFactoryRegistry, fileDistributionFactory,
hostProvisionerProvider, permApp,
- configserverConfig, defRepo, curator, new Zone(configserverConfig));
+ configserverConfig, defRepo, curator,
+ new Zone(configserverConfig, emptyNodeFlavors()));
return new TestComponentRegistry(curator, configCurator.orElse(ConfigCurator.create(curator)),
metrics, modelFactoryRegistry,
permApp,
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/TestWithRpc.java b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/TestWithRpc.java
index 8f1754357b2..df1bb7f4f62 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/TestWithRpc.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/rpc/TestWithRpc.java
@@ -27,6 +27,7 @@ import java.time.Instant;
import java.util.ArrayList;
import java.util.List;
+import static com.yahoo.vespa.config.server.SuperModelRequestHandlerTest.emptyNodeFlavors;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
@@ -84,7 +85,8 @@ public class TestWithRpc {
rpcServer = new RpcServer(new ConfigserverConfig(new ConfigserverConfig.Builder().rpcport(port).numthreads(1).maxgetconfigclients(1).hostedVespa(hostedVespa)),
new SuperModelRequestHandler(generationCounter,
new TestConfigDefinitionRepo(),
- new ConfigserverConfig(new ConfigserverConfig.Builder())),
+ new ConfigserverConfig(new ConfigserverConfig.Builder()),
+ emptyNodeFlavors()),
Metrics.createTestMetrics(), new HostRegistries(),
hostLivenessTracker);
rpcServer.onTenantCreate(TenantName.from("default"), tenantProvider);
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 fc0dc52dc01..bd8c764353f 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
@@ -85,7 +85,10 @@ public class TenantRequestHandlerTest extends TestWithCurator {
}
private void feedApp(File appDir, long sessionId, ApplicationId appId) throws IOException {
- SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, configCurator, new PathProvider(Path.createRoot()).getSessionDir(sessionId), new TestConfigDefinitionRepo(), "");
+ SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, configCurator,
+ new PathProvider(Path.createRoot()).getSessionDir(sessionId),
+ new TestConfigDefinitionRepo(),
+ "", Optional.empty());
zkc.writeApplicationId(appId);
File app = tempFolder.newFolder();
IOUtils.copyDirectory(appDir, app);
@@ -98,7 +101,10 @@ public class TenantRequestHandlerTest extends TestWithCurator {
}
private ApplicationSet reloadConfig(long id, String application) {
- SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, configCurator, new PathProvider(Path.createRoot()).getSessionDir(id), new TestConfigDefinitionRepo(), "");
+ SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, configCurator,
+ new PathProvider(Path.createRoot()).getSessionDir(id),
+ new TestConfigDefinitionRepo(),
+ "", Optional.empty());
zkc.writeApplicationId(new ApplicationId.Builder().tenant(tenant).applicationName(application).build());
RemoteSession session = new RemoteSession(tenant, id, componentRegistry, zkc);
return session.ensureApplicationLoaded();
@@ -176,7 +182,10 @@ public class TenantRequestHandlerTest extends TestWithCurator {
@Test
public void testResolveForAppId() {
long id = 1l;
- SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, configCurator, new PathProvider(Path.createRoot()).getSessionDir(id), new TestConfigDefinitionRepo(), "");
+ SessionZooKeeperClient zkc = new SessionZooKeeperClient(curator, configCurator,
+ new PathProvider(Path.createRoot()).getSessionDir(id),
+ new TestConfigDefinitionRepo(),
+ "", Optional.empty());
ApplicationId appId = new ApplicationId.Builder()
.tenant(tenant)
.applicationName("myapp").instanceName("myinst").build();