diff options
author | Jon Bratseth <bratseth@gmail.com> | 2021-12-13 08:34:42 +0100 |
---|---|---|
committer | Jon Bratseth <bratseth@gmail.com> | 2021-12-13 08:34:42 +0100 |
commit | cf7cf81ea64c016e5dcc9032462624ddb4460842 (patch) | |
tree | 39d1d97aafa73bdb8ca5d290f1148b9dc9116fa1 /container-core | |
parent | da72f32fa5bfcce81b6bcc8dbe717be0869bcc77 (diff) |
Revert "Merge pull request #20456 from vespa-engine/revert-20439-bratseth/zoneinfo-in-query-profile-context"
This reverts commit 2780822f7d1fc66ea2833b2b7aaa2b9cb74f5833, reversing
changes made to 8ff6429daf9a695f2fa5d45a8033c75fdadfcfe2.
Diffstat (limited to 'container-core')
3 files changed, 24 insertions, 0 deletions
diff --git a/container-core/pom.xml b/container-core/pom.xml index 7e4198bad0d..910781f4e7d 100644 --- a/container-core/pom.xml +++ b/container-core/pom.xml @@ -240,6 +240,12 @@ <scope>provided</scope> </dependency> <dependency> + <groupId>com.yahoo.vespa</groupId> + <artifactId>hosted-zone-api</artifactId> + <version>${project.version}</version> + <scope>provided</scope> + </dependency> + <dependency> <groupId>javax.servlet</groupId> <artifactId>javax.servlet-api</artifactId> <scope>provided</scope> diff --git a/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java b/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java index 99637e08b77..3ae28c2816d 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java @@ -142,6 +142,7 @@ public class HandlersConfigurerTestWrapper { // Needed by e.g. SearchHandler bind(Linguistics.class).to(SimpleLinguistics.class).in(Scopes.SINGLETON); bind(Embedder.class).to(Embedder.FailingEmbedder.class).in(Scopes.SINGLETON); + bind(ai.vespa.cloud.ZoneInfo.class).to(MockZoneInfo.class); bind(ContainerThreadPool.class).to(SimpleContainerThreadpool.class); bind(Metric.class).to(MockMetric.class); } diff --git a/container-core/src/main/java/com/yahoo/container/core/config/testutil/MockZoneInfo.java b/container-core/src/main/java/com/yahoo/container/core/config/testutil/MockZoneInfo.java new file mode 100644 index 00000000000..11c14f8e581 --- /dev/null +++ b/container-core/src/main/java/com/yahoo/container/core/config/testutil/MockZoneInfo.java @@ -0,0 +1,17 @@ +// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. +package com.yahoo.container.core.config.testutil; + +import ai.vespa.cloud.ZoneInfo; + +/** + * A ZoneInfo subclass which can be created (for injection) with an emopty constructor + * + * @author bratseth + */ +public class MockZoneInfo extends ZoneInfo { + + public MockZoneInfo() { + super(ZoneInfo.defaultInfo().application(), ZoneInfo.defaultInfo().zone()); + } + +} |