diff options
-rw-r--r-- | configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java | 2 | ||||
-rw-r--r-- | vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java | 20 |
2 files changed, 8 insertions, 14 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java index 4bebff998f9..ed526908f6f 100644 --- a/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java +++ b/configserver/src/main/java/com/yahoo/vespa/config/server/maintenance/SessionsMaintainer.java @@ -19,7 +19,7 @@ public class SessionsMaintainer extends ConfigServerMaintainer { private final boolean hostedVespa; SessionsMaintainer(ApplicationRepository applicationRepository, Curator curator, Duration interval, FlagSource flagSource) { - super(applicationRepository, curator, flagSource, Duration.ofMinutes(5), interval); + super(applicationRepository, curator, flagSource, Duration.ofMinutes(1), interval); this.hostedVespa = applicationRepository.configserverConfig().hostedVespa(); } diff --git a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java index 7e3f61c5c0f..94ddd0a7f87 100644 --- a/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java +++ b/vespa-osgi-testrunner/src/main/java/com/yahoo/vespa/testrunner/JunitRunner.java @@ -1,8 +1,6 @@ // Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. package com.yahoo.vespa.testrunner; -import ai.vespa.cloud.Environment; -import ai.vespa.cloud.Zone; import ai.vespa.hosted.api.TestDescriptor; import ai.vespa.hosted.cd.internal.TestRuntimeProvider; import com.google.inject.Inject; @@ -51,11 +49,10 @@ public class JunitRunner extends AbstractComponent implements TestRunner { @Inject public JunitRunner(OsgiFramework osgiFramework, JunitTestRunnerConfig config, - TestRuntimeProvider testRuntimeProvider, - Zone zone) { + TestRuntimeProvider testRuntimeProvider) { this.testRuntimeProvider = testRuntimeProvider; this.bundleContext = getUnrestrictedBundleContext(osgiFramework); - uglyHackSetCredentialsRootSystemProperty(config, zone); + uglyHackSetCredentialsRootSystemProperty(config); } // Hack to retrieve bundle context that allows access to other bundles @@ -71,17 +68,14 @@ public class JunitRunner extends AbstractComponent implements TestRunner { } // TODO(bjorncs|tokle) Propagate credentials root without system property. Ideally move knowledge about path to test-runtime implementations - private static void uglyHackSetCredentialsRootSystemProperty(JunitTestRunnerConfig config, Zone zone) { - Optional<String> credentialsRoot; + private static void uglyHackSetCredentialsRootSystemProperty(JunitTestRunnerConfig config) { + String credentialsRoot; if (config.useAthenzCredentials()) { - credentialsRoot = Optional.of(Defaults.getDefaults().underVespaHome("var/vespa/sia")); - } else if (zone.environment() != Environment.prod){ - // Only set credentials in non-prod zones where not available - credentialsRoot = Optional.of(config.artifactsPath().toString()); + credentialsRoot = Defaults.getDefaults().underVespaHome("var/vespa/sia"); } else { - credentialsRoot = Optional.empty(); + credentialsRoot = config.artifactsPath().toString(); } - credentialsRoot.ifPresent(root -> System.setProperty("vespa.test.credentials.root", root)); + System.setProperty("vespa.test.credentials.root", credentialsRoot); } @Override |