Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-01-28 11:21:23 -0500
committerGlyn Normington2011-01-28 11:21:23 -0500
commitca911ddd68ffeac684a689a9d4cf34f837d42c22 (patch)
treec882a084062323f8216fe51ea52d24fb41e31c90 /org.eclipse.virgo.kernel.deployer.test
parent730f6d095f4d33e7155f691cd195e86b44815735 (diff)
downloadorg.eclipse.virgo.kernel-ca911ddd68ffeac684a689a9d4cf34f837d42c22.tar.gz
org.eclipse.virgo.kernel-ca911ddd68ffeac684a689a9d4cf34f837d42c22.tar.xz
org.eclipse.virgo.kernel-ca911ddd68ffeac684a689a9d4cf34f837d42c22.zip
bug 330776: relax restriction that a region and its inbound filters may not both contain a given bundle symbolic name and bundle version
Diffstat (limited to 'org.eclipse.virgo.kernel.deployer.test')
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/AbstractDeployerIntegrationTest.java23
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties16
2 files changed, 14 insertions, 25 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/AbstractDeployerIntegrationTest.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/AbstractDeployerIntegrationTest.java
index e2b3cc0a..497bdab5 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/AbstractDeployerIntegrationTest.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/AbstractDeployerIntegrationTest.java
@@ -16,7 +16,6 @@ import static org.junit.Assert.assertFalse;
import java.io.IOException;
import java.lang.management.ManagementFactory;
-import java.util.Collection;
import javax.management.MBeanServer;
import javax.management.ObjectName;
@@ -24,9 +23,7 @@ import javax.management.ObjectName;
import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
import org.eclipse.virgo.kernel.osgi.framework.OsgiFramework;
-import org.eclipse.virgo.kernel.osgi.region.Region;
import org.eclipse.virgo.test.framework.dmkernel.DmKernelTestRunner;
-import org.junit.Assert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -75,25 +72,7 @@ public abstract class AbstractDeployerIntegrationTest {
}
private BundleContext getKernelContext() {
- try {
- Collection<ServiceReference<Region>> references = this.context.getServiceReferences(Region.class,"(org.eclipse.virgo.kernel.region.name=org.eclipse.virgo.region.kernel)");
- //XXX Assert.assertEquals(1, references.size()); Appear to get two services with the same region bundle context
- ServiceReference<Region> reference = references.iterator().next();
- Region kernelRegion = this.context.getService(reference);
- Assert.assertNotNull("Kernel Region not found", kernelRegion);
- BundleContext kernelContext = kernelRegion.getBundleContext();
-
- //ServiceReference<Region> ref2 = i.next();
- //BundleContext kc2 = this.context.getService(ref2).getBundleContext();
-
- Assert.assertNotNull("Kernel Region bundle context not found", kernelContext);
- this.context.ungetService(reference);
- return kernelContext;
- } catch (InvalidSyntaxException e) {
- e.printStackTrace();
- Assert.assertTrue(false);
- return null;
- }
+ return this.context.getBundle(0L).getBundleContext();
}
@BeforeClass
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
index 735fcfea..702be33b 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties
@@ -42,14 +42,20 @@ packageImports =\
org.aspectj.*;version="[1.6.5.RELEASE,2.0.0)",\
org.junit;version="[4.7.0,5.0.0)",\
org.junit.runner;version="[4.7.0,5.0.0)",\
+ org.osgi.*;version="0",\
+ org.ietf.jgss;version="0",\
+ org.omg.*;version="0",\
+ org.w3c.*;version="0",\
+ org.xml.*;version="0",\
+ org.eclipse.osgi.*;version="0",\
+ javax.*;version="0",\
org.osgi.service.cm;version="0",\
org.osgi.service.event;version="0",\
org.slf4j;version="[1.6.1,2)"
serviceImports =\
org.eclipse.virgo.kernel.osgi.region.Region,\
- org.eclipse.virgo.kernel.osgi.region.RegionMembership,\
- org.osgi.framework.hooks.resolver.ResolverHookFactory,\
+ org.eclipse.virgo.kernel.osgi.region.RegionDigraph,\
org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer,\
org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser,\
org.eclipse.virgo.kernel.install.artifact.ScopeServiceRepository,\
@@ -60,18 +66,22 @@ serviceImports =\
org.eclipse.virgo.medic.eventlog.EventLoggerFactory,\
org.eclipse.virgo.repository.Repository,\
org.eclipse.virgo.kernel.core.Shutdown,\
+ org.osgi.framework.hooks.resolver.ResolverHookFactory,\
org.osgi.service.cm.ConfigurationAdmin,\
org.osgi.service.event.EventAdmin,\
org.eclipse.virgo.medic.eventlog.EventLogger,\
org.eclipse.virgo.medic.dump.DumpGenerator,\
org.eclipse.virgo.kernel.shim.scope.ScopeFactory,\
org.eclipse.virgo.kernel.shim.serviceability.TracingService,\
- org.eclipse.virgo.kernel.model.RuntimeArtifactRepository
+ org.eclipse.virgo.kernel.model.RuntimeArtifactRepository,\
+ org.eclipse.osgi.service.resolver.PlatformAdmin,\
+ org.osgi.service.packageadmin.PackageAdmin
serviceExports =\
org.eclipse.virgo.kernel.install.artifact.InstallArtifactLifecycleListener,\
org.eclipse.virgo.kernel.install.artifact.ArtifactTypeDeterminer,\
org.eclipse.virgo.kernel.install.pipeline.stage.transform.Transformer,\
+ org.eclipse.virgo.kernel.module.ModuleContextAccessor,\
org.eclipse.virgo.medic.dump.DumpContributor,\
org.eclipse.virgo.kernel.osgi.quasi.QuasiFrameworkFactory,\
org.eclipse.virgo.kernel.osgi.framework.OsgiFramework,\

Back to the top