From 69c2e9143f40e54955bb220416c9a5b75f9f9cb5 Mon Sep 17 00:00:00 2001 From: Glyn Normington Date: Tue, 1 Nov 2011 12:01:58 +0000 Subject: bug 361905: test cleanup of bundleId->Region mapping on region removal --- .../equinox/region/tests/system/RegionSystemTests.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/RegionSystemTests.java b/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/RegionSystemTests.java index 9897d470d..dfe541f7e 100644 --- a/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/RegionSystemTests.java +++ b/bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/RegionSystemTests.java @@ -23,6 +23,9 @@ import org.osgi.framework.wiring.*; import org.osgi.util.tracker.ServiceTracker; public class RegionSystemTests extends AbstractRegionSystemTest { + + private static final long TEST_BUNDLE_ID = 452345245L; + public void testBasic() throws BundleException, InvalidSyntaxException, InterruptedException { // get the system region Region systemRegion = digraph.getRegion(0); @@ -586,4 +589,12 @@ public class RegionSystemTests extends AbstractRegionSystemTest { } } + public void testRemoveRegion() throws BundleException { + Region pp1Region = digraph.createRegion(PP1); + pp1Region.addBundle(TEST_BUNDLE_ID); + assertEquals("Region not associated with bundle id", pp1Region, digraph.getRegion(TEST_BUNDLE_ID)); + digraph.removeRegion(pp1Region); + assertNull("Region still associated with bundle id", digraph.getRegion(TEST_BUNDLE_ID)); + } + } -- cgit v1.2.3