aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/test/java/com/yahoo
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2023-01-06 15:09:17 +0100
committerGitHub <noreply@github.com>2023-01-06 15:09:17 +0100
commit64e9d534287593e7be365973a5d1084298a65f3e (patch)
tree25a48348d6af7c15af7ceeefd5f2fb7f9cd07d12 /container-core/src/test/java/com/yahoo
parent55fb144ec32fdcdcf42535fcf27d404aece9594b (diff)
Revert "Improve user friendliness when class resolution fails."
Diffstat (limited to 'container-core/src/test/java/com/yahoo')
-rw-r--r--container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java12
-rw-r--r--container-core/src/test/java/com/yahoo/container/core/config/BundleTestUtil.java3
-rw-r--r--container-core/src/test/java/com/yahoo/container/core/config/TestBundle.java10
3 files changed, 1 insertions, 24 deletions
diff --git a/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java b/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java
index 764771bc285..e646e916521 100644
--- a/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java
+++ b/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java
@@ -2,7 +2,6 @@
package com.yahoo.container.core.config;
import com.yahoo.container.di.Osgi.GenerationStatus;
-import com.yahoo.jdisc.core.BsnVersion;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.osgi.framework.Bundle;
@@ -36,7 +35,6 @@ public class ApplicationBundleLoaderTest {
@Test
void bundles_are_installed_and_started() {
bundleLoader.useBundles(List.of(BUNDLE_1_REF));
- bundleLoader.completeGeneration(GenerationStatus.SUCCESS);
assertEquals(1, osgi.getInstalledBundles().size());
// The bundle is installed and started
@@ -50,16 +48,6 @@ public class ApplicationBundleLoaderTest {
}
@Test
- void current_bundles_metadata_can_be_retrieved() {
- bundleLoader.useBundles(List.of(BUNDLE_1_REF, BUNDLE_2_REF));
- bundleLoader.completeGeneration(GenerationStatus.SUCCESS);
-
- List<BsnVersion> activeBundles = bundleLoader.activeBundlesBsnVersion();
- assertEquals(new BsnVersion(BUNDLE_1), activeBundles.get(0));
- assertEquals(new BsnVersion(BUNDLE_2), activeBundles.get(1));
- }
-
- @Test
void generation_must_be_marked_complete_before_using_new_bundles() {
bundleLoader.useBundles(List.of(BUNDLE_1_REF));
assertThrows(IllegalStateException.class,
diff --git a/container-core/src/test/java/com/yahoo/container/core/config/BundleTestUtil.java b/container-core/src/test/java/com/yahoo/container/core/config/BundleTestUtil.java
index 60ea9009e1e..fddbeaf42be 100644
--- a/container-core/src/test/java/com/yahoo/container/core/config/BundleTestUtil.java
+++ b/container-core/src/test/java/com/yahoo/container/core/config/BundleTestUtil.java
@@ -4,7 +4,6 @@ import com.yahoo.config.FileReference;
import com.yahoo.filedistribution.fileacquirer.FileAcquirer;
import com.yahoo.osgi.Osgi;
import org.osgi.framework.Bundle;
-import org.osgi.framework.Version;
import java.util.List;
import java.util.Map;
@@ -17,7 +16,7 @@ public class BundleTestUtil {
public static final FileReference BUNDLE_1_REF = new FileReference("bundle-1");
public static final Bundle BUNDLE_1 = new TestBundle(BUNDLE_1_REF.value());
public static final FileReference BUNDLE_2_REF = new FileReference("bundle-2");
- public static final Bundle BUNDLE_2 = new TestBundle(BUNDLE_2_REF.value(), new Version(2, 0, 0, "SNAPSHOT"));
+ public static final Bundle BUNDLE_2 = new TestBundle(BUNDLE_2_REF.value());
public static Map<String, Bundle> testBundles() {
return Map.of(BUNDLE_1_REF.value(), BUNDLE_1,
diff --git a/container-core/src/test/java/com/yahoo/container/core/config/TestBundle.java b/container-core/src/test/java/com/yahoo/container/core/config/TestBundle.java
index babc936494e..17709844f99 100644
--- a/container-core/src/test/java/com/yahoo/container/core/config/TestBundle.java
+++ b/container-core/src/test/java/com/yahoo/container/core/config/TestBundle.java
@@ -21,17 +21,11 @@ public class TestBundle extends MockBundle {
private static final BundleRevision revision = new TestBundleRevision();
private final String symbolicName;
- private final Version version;
boolean started = false;
public TestBundle(String symbolicName) {
- this(symbolicName, BundleVersion);
- }
-
- public TestBundle(String symbolicName, Version version) {
this.symbolicName = symbolicName;
- this.version = version;
}
@Override
@@ -44,10 +38,6 @@ public class TestBundle extends MockBundle {
return symbolicName;
}
- @Override
- public Version getVersion() {
- return version;
- }
@SuppressWarnings("unchecked")
@Override