summaryrefslogtreecommitdiffstats
path: root/config-model
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@oath.com>2019-11-11 13:40:21 +0100
committerGitHub <noreply@github.com>2019-11-11 13:40:21 +0100
commiteef849ac5d308b9e910fc4f679a9360acf459239 (patch)
tree9d94daa2cadce7692bf09bbb7db71ad0e6465194 /config-model
parentfd61d661ac5f28263a48ac6051c17c205f8e101b (diff)
parent0861faaf480fbbd185d650e6bcf8122d88d3c8de (diff)
Merge pull request #11267 from vespa-engine/hmusum/create-all-needed-config-models-for-manually-deployed-apps
Always try to build config model for old versions
Diffstat (limited to 'config-model')
-rw-r--r--config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java b/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java
index 1dc0b838470..54807697da4 100644
--- a/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java
+++ b/config-model/src/main/java/com/yahoo/vespa/model/VespaModelFactory.java
@@ -66,14 +66,20 @@ public class VespaModelFactory implements ModelFactory {
this.clock = Clock.systemUTC();
}
-
+
+ // For testing only
public VespaModelFactory(ConfigModelRegistry configModelRegistry) {
this(configModelRegistry, Clock.systemUTC());
}
+
+ // For testing only
public VespaModelFactory(ConfigModelRegistry configModelRegistry, Clock clock) {
- this(new Version(VespaVersion.major, VespaVersion.minor, VespaVersion.micro), configModelRegistry, clock);
+ this(new Version(VespaVersion.major, VespaVersion.minor, VespaVersion.micro), configModelRegistry,
+ clock, Zone.defaultZone());
}
- public VespaModelFactory(Version version, ConfigModelRegistry configModelRegistry, Clock clock) {
+
+ // For testing only
+ public VespaModelFactory(Version version, ConfigModelRegistry configModelRegistry, Clock clock, Zone zone) {
this.version = version;
if (configModelRegistry == null) {
this.configModelRegistry = new NullConfigModelRegistry();
@@ -82,7 +88,7 @@ public class VespaModelFactory implements ModelFactory {
this.configModelRegistry = configModelRegistry;
}
this.modelImporters = Collections.emptyList();
- this.zone = Zone.defaultZone();
+ this.zone = zone;
this.clock = clock;
}