aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-11-01 08:01:58 (EDT)
committerGlyn Normington2011-11-01 08:01:58 (EDT)
commit69c2e9143f40e54955bb220416c9a5b75f9f9cb5 (patch)
tree684f10fd27d0ed77b54cb1e83693fa591389a6ee
parent225839628dbd75dc9d309e96840a28e60a3172de (diff)
downloadrt.equinox.bundles-69c2e9143f40e54955bb220416c9a5b75f9f9cb5.zip
rt.equinox.bundles-69c2e9143f40e54955bb220416c9a5b75f9f9cb5.tar.gz
rt.equinox.bundles-69c2e9143f40e54955bb220416c9a5b75f9f9cb5.tar.bz2
bug 361905: test cleanup of bundleId->Region mapping on region removal
-rw-r--r--bundles/org.eclipse.equinox.region.tests/src/org/eclipse/equinox/region/tests/system/RegionSystemTests.java11
1 files changed, 11 insertions, 0 deletions
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 9897d47..dfe541f 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));
+ }
+
}