aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-06-09 16:21:19 +0200
committerJon Bratseth <bratseth@gmail.com>2022-06-09 16:21:19 +0200
commitea619a00e02666f7eed0721d60560017d9605cff (patch)
tree73b7c9920537291a40436bd5bd462710da475f29
parentd2d5d934af850529dfc8eae93a01f6611c276a5b (diff)
Use actual current major in tests
-rw-r--r--configserver/src/test/apps/app-major-version-7/deployment.xml (renamed from configserver/src/test/apps/app-major-version-2/deployment.xml)2
-rw-r--r--configserver/src/test/apps/app-major-version-7/hosts.xml (renamed from configserver/src/test/apps/app-major-version-2/hosts.xml)0
-rw-r--r--configserver/src/test/apps/app-major-version-7/schemas/music.sd (renamed from configserver/src/test/apps/app-major-version-2/schemas/music.sd)0
-rw-r--r--configserver/src/test/apps/app-major-version-7/services.xml (renamed from configserver/src/test/apps/app-major-version-2/services.xml)0
-rw-r--r--configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionRepositoryTest.java14
-rw-r--r--testutil/src/main/java/com/yahoo/test/ManualClock.java2
6 files changed, 8 insertions, 10 deletions
diff --git a/configserver/src/test/apps/app-major-version-2/deployment.xml b/configserver/src/test/apps/app-major-version-7/deployment.xml
index 6d95ca8a16c..7412557b8e7 100644
--- a/configserver/src/test/apps/app-major-version-2/deployment.xml
+++ b/configserver/src/test/apps/app-major-version-7/deployment.xml
@@ -1,2 +1,2 @@
<!-- Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -->
-<deployment version='1.0' major-version='2'/>
+<deployment version='1.0' major-version='7'/>
diff --git a/configserver/src/test/apps/app-major-version-2/hosts.xml b/configserver/src/test/apps/app-major-version-7/hosts.xml
index a515a4e97da..a515a4e97da 100644
--- a/configserver/src/test/apps/app-major-version-2/hosts.xml
+++ b/configserver/src/test/apps/app-major-version-7/hosts.xml
diff --git a/configserver/src/test/apps/app-major-version-2/schemas/music.sd b/configserver/src/test/apps/app-major-version-7/schemas/music.sd
index f4b11d1e8e4..f4b11d1e8e4 100644
--- a/configserver/src/test/apps/app-major-version-2/schemas/music.sd
+++ b/configserver/src/test/apps/app-major-version-7/schemas/music.sd
diff --git a/configserver/src/test/apps/app-major-version-2/services.xml b/configserver/src/test/apps/app-major-version-7/services.xml
index 5b80c10dee2..5b80c10dee2 100644
--- a/configserver/src/test/apps/app-major-version-2/services.xml
+++ b/configserver/src/test/apps/app-major-version-7/services.xml
diff --git a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionRepositoryTest.java b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionRepositoryTest.java
index 40f0b9c6e71..b380436e028 100644
--- a/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionRepositoryTest.java
+++ b/configserver/src/test/java/com/yahoo/vespa/config/server/session/SessionRepositoryTest.java
@@ -236,7 +236,7 @@ public class SessionRepositoryTest {
@Test
public void require_that_an_application_package_can_limit_to_one_major_version() throws Exception {
MockModelFactory failingFactory = new MockModelFactory();
- failingFactory.vespaVersion = new Version(3, 0, 0);
+ failingFactory.vespaVersion = new Version(8, 0, 0);
failingFactory.throwErrorOnLoad = true;
MockModelFactory okFactory = new MockModelFactory();
@@ -245,28 +245,28 @@ public class SessionRepositoryTest {
setup(new ModelFactoryRegistry(List.of(okFactory, failingFactory)));
- File testApp = new File("src/test/apps/app-major-version-2");
+ File testApp = new File("src/test/apps/app-major-version-7");
deploy(applicationId, testApp);
- // Does not cause an error because model version 3 is skipped
+ // Does not cause an error because model version 8 is skipped
}
@Test
public void require_that_an_application_package_can_limit_to_one_higher_major_version() throws Exception {
MockModelFactory failingFactory = new MockModelFactory();
- failingFactory.vespaVersion = new Version(3, 0, 0);
+ failingFactory.vespaVersion = new Version(8, 0, 0);
failingFactory.throwErrorOnLoad = true;
MockModelFactory okFactory = new MockModelFactory();
- okFactory.vespaVersion = new Version(1, 0, 0);
+ okFactory.vespaVersion = new Version(6, 0, 0);
okFactory.throwErrorOnLoad = false;
setup(new ModelFactoryRegistry(List.of(okFactory, failingFactory)));
- File testApp = new File("src/test/apps/app-major-version-2");
+ File testApp = new File("src/test/apps/app-major-version-7");
deploy(applicationId, testApp);
- // Does not cause an error because model version 3 is skipped
+ // Does not cause an error because model version 8 is skipped
}
@Test
diff --git a/testutil/src/main/java/com/yahoo/test/ManualClock.java b/testutil/src/main/java/com/yahoo/test/ManualClock.java
index d946101412d..c8e9314cb26 100644
--- a/testutil/src/main/java/com/yahoo/test/ManualClock.java
+++ b/testutil/src/main/java/com/yahoo/test/ManualClock.java
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.test;
-import com.yahoo.component.annotation.Inject;
import java.time.Clock;
import java.time.Instant;
import java.time.LocalDateTime;
@@ -20,7 +19,6 @@ public class ManualClock extends Clock {
private final AtomicReference<Instant> currentTime = new AtomicReference<>(Instant.now());
- @Inject
public ManualClock() {}
public ManualClock(String utcIsoTime) {