summaryrefslogtreecommitdiffstats
path: root/jdisc_core_test
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2022-08-31 14:11:38 +0200
committergjoranv <gv@verizonmedia.com>2022-08-31 14:11:38 +0200
commitf869fa7fc3fbce76bc19745201bb62484dfc8efe (patch)
treeb8d8e622116ef172e43395f6c9671504f2a740d4 /jdisc_core_test
parent60e7b087648bc3c5fa4c4a06ca75f740e176f9d5 (diff)
Revert "Clean up bundles and allowed duplicates after a failed reconfig."
This reverts commit b0a398eaeadfaf12e31bcfef2e41892439db1149.
Diffstat (limited to 'jdisc_core_test')
-rw-r--r--jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java16
1 files changed, 7 insertions, 9 deletions
diff --git a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java
index 713f0397984..07797838a4b 100644
--- a/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java
+++ b/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java
@@ -81,18 +81,14 @@ public class BundleCollisionHookIntegrationTest {
}
@Test
- public void duplicates_whitelist_is_reset_upon_each_call() throws Exception {
+ public void duplicates_whitelist_can_be_updated_with_additional_bundles() throws Exception {
Bundle bundleL = startBundle(felix, "cert-l1.jar");
Bundle bundleMl = startBundle(felix, "cert-ml.jar");
felix.allowDuplicateBundles(Collections.singleton(bundleL));
felix.allowDuplicateBundles(Collections.singleton(bundleMl));
- try {
- startBundle(felix, "cert-l1-dup.jar");
- fail("Expected exception due to duplicate bundles");
- } catch (BundleException e) {
- assertTrue(e.getMessage().contains("Bundle symbolic name and version are not unique"));
- }
+ startBundle(felix, "cert-l1-dup.jar");
+ startBundle(felix, "cert-ml-dup.jar");
}
@Test
@@ -101,7 +97,8 @@ public class BundleCollisionHookIntegrationTest {
Bundle bundleB = startBundle(felix, "cert-b.jar");
// Makes A and B visible to each other
- felix.allowDuplicateBundles(Set.of(bundleA, bundleB));
+ felix.allowDuplicateBundles(Set.of(bundleA));
+ felix.allowDuplicateBundles(Set.of(bundleB));
List<Bundle> visibleBundles = felix.getBundles(bundleA);
@@ -120,7 +117,8 @@ public class BundleCollisionHookIntegrationTest {
Bundle bundleB = startBundle(felix, "cert-b.jar");
// Makes A and B visible to each other
- felix.allowDuplicateBundles(Set.of(bundleA, bundleB));
+ felix.allowDuplicateBundles(Set.of(bundleA));
+ felix.allowDuplicateBundles(Set.of(bundleB));
List<Bundle> visibleBundles = felix.getBundles(bundleA);
assertEquals(3, visibleBundles.size());