summaryrefslogtreecommitdiffstats
path: root/jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'jdisc_core_test/integration_test/src/test/java/com/yahoo/jdisc/core/BundleCollisionHookIntegrationTest.java')
-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());