Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBorislav Kapukaranov2011-02-03 19:02:43 -0500
committerBorislav Kapukaranov2011-02-03 19:02:43 -0500
commit7952b693f5694bacb0cfb382d123f6738b701612 (patch)
treead2b33e1892986b3365baeaecaaf3ffd75dbed6f /org.eclipse.virgo.kernel.deployer.test
parent517a5b8b81f20b0ddd74674301eb51f1fe69c69a (diff)
parent1f610333e7a414e248a19675248a7df45eb9bfb8 (diff)
downloadorg.eclipse.virgo.kernel-7952b693f5694bacb0cfb382d123f6738b701612.tar.gz
org.eclipse.virgo.kernel-7952b693f5694bacb0cfb382d123f6738b701612.tar.xz
org.eclipse.virgo.kernel-7952b693f5694bacb0cfb382d123f6738b701612.zip
Merge with origin/bug330776-framework-hooks
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.java20
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/NestedPlanIntegrationTests.java4
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/MANIFEST.MF1
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties7
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties7
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties7
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/test/resources/config/org.eclipse.virgo.kernel.userregion.properties33
7 files changed, 46 insertions, 33 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 7c326acd..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
@@ -20,6 +20,10 @@ import java.lang.management.ManagementFactory;
import javax.management.MBeanServer;
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.test.framework.dmkernel.DmKernelTestRunner;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.runner.RunWith;
@@ -31,15 +35,8 @@ import org.osgi.framework.ServiceReference;
import org.osgi.framework.Version;
import org.osgi.service.cm.Configuration;
import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.framework.SurrogateBundle;
import org.osgi.service.packageadmin.PackageAdmin;
-import org.eclipse.virgo.kernel.osgi.framework.OsgiFramework;
-
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
-import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
-import org.eclipse.virgo.test.framework.dmkernel.DmKernelTestRunner;
-
@RunWith(DmKernelTestRunner.class)
@SuppressWarnings("deprecation")
public abstract class AbstractDeployerIntegrationTest {
@@ -66,16 +63,17 @@ public abstract class AbstractDeployerIntegrationTest {
this.deployer = this.context.getService(applicationDeployerServiceReference);
}
- Bundle bundle = this.context.getBundle(1);
- if (bundle instanceof SurrogateBundle) {
- this.kernelContext = ((SurrogateBundle) bundle).getCompositeBundleContext();
- }
+ this.kernelContext = getKernelContext();
ServiceReference<PackageAdmin> packageAdminServiceReference = context.getServiceReference(PackageAdmin.class);
if (packageAdminServiceReference != null) {
this.packageAdmin = context.getService(packageAdminServiceReference);
}
}
+
+ private BundleContext getKernelContext() {
+ return this.context.getBundle(0L).getBundleContext();
+ }
@BeforeClass
public static void awaitKernelStartup() throws Exception {
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/NestedPlanIntegrationTests.java b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/NestedPlanIntegrationTests.java
index 8bb533c1..6e64d014 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/NestedPlanIntegrationTests.java
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/java/org/eclipse/virgo/kernel/deployer/test/NestedPlanIntegrationTests.java
@@ -22,6 +22,7 @@ import java.io.IOException;
import java.io.Writer;
import java.util.ArrayList;
import java.util.List;
+import java.util.Set;
import org.eclipse.virgo.kernel.deployer.core.DeploymentException;
import org.eclipse.virgo.kernel.deployer.core.DeploymentIdentity;
@@ -276,7 +277,8 @@ public class NestedPlanIntegrationTests extends AbstractDeployerIntegrationTest
private void checkPlanScoping(TestPlanArtifactInfo parent, Model model) {
if (parent.isScoped()) {
Artifact parentPlan = getPlan(parent);
- for (Artifact child : parentPlan.getDependents()) {
+ Set<Artifact> children = parentPlan.getDependents();
+ for (Artifact child : children) {
if (PLAN_TYPE.equals(child.getType())) {
String childPlanName = child.getName();
String unscopedChildPlanName = parent.getChildPlan().getName();
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/MANIFEST.MF b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/MANIFEST.MF
index 1274b8a2..326a811f 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/MANIFEST.MF
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/MANIFEST.MF
@@ -12,6 +12,7 @@ Import-Package: org.eclipse.virgo.kernel.core,
org.eclipse.virgo.kernel.module,
org.eclipse.virgo.kernel.osgi.common,
org.eclipse.virgo.kernel.osgi.framework,
+ org.eclipse.virgo.kernel.osgi.region,
org.eclipse.virgo.kernel.services.work,
org.eclipse.virgo.util.io,
org.eclipse.virgo.util.math,
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties
index bc31d032..dd6589b3 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/no.heap.dump.test.config.properties
@@ -32,10 +32,12 @@ launcher.bundles =\
file:../ivy-cache/repository/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar,\
file:../org.eclipse.virgo.kernel.artifact/target/classes@start,\
file:../org.eclipse.virgo.kernel.services/target/classes@start,\
- file:../org.eclipse.virgo.kernel.osgi/target/classes@start,\
file:../org.eclipse.virgo.kernel.deployer/target/classes@start,\
file:../org.eclipse.virgo.kernel.model/target/classes@start,\
- file:../org.eclipse.virgo.kernel.kerneldmfragment/target/classes
+ file:../org.eclipse.virgo.kernel.kerneldmfragment/target/classes,\
+ file:../org.eclipse.virgo.kernel.osgi/target/classes@start,\
+ file:../org.eclipse.virgo.kernel.userregionfactory/target/classes@start
+
org.eclipse.virgo.test.properties.include=file:../build.versions,file:../build.properties
@@ -45,6 +47,7 @@ osgi.context.bootdelegation=false
osgi.compatibility.bootdelegation=false
osgi.clean=true
osgi.configuration.area=target
+org.osgi.framework.bsnversion=multiple
#osgi.console=2401
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties
index 689614b6..83855264 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/spring256.test.config.properties
@@ -32,10 +32,12 @@ launcher.bundles =\
file:../ivy-cache/repository/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar,\
file:../org.eclipse.virgo.kernel.artifact/target/classes@start,\
file:../org.eclipse.virgo.kernel.services/target/classes@start,\
- file:../org.eclipse.virgo.kernel.osgi/target/classes@start,\
file:../org.eclipse.virgo.kernel.deployer/target/classes@start,\
file:../org.eclipse.virgo.kernel.model/target/classes@start,\
- file:../org.eclipse.virgo.kernel.kerneldmfragment/target/classes
+ file:../org.eclipse.virgo.kernel.kerneldmfragment/target/classes,\
+ file:../org.eclipse.virgo.kernel.osgi/target/classes@start,\
+ file:../org.eclipse.virgo.kernel.userregionfactory/target/classes@start
+
org.eclipse.virgo.test.properties.include=file:../build.versions,file:../build.properties
@@ -45,6 +47,7 @@ osgi.context.bootdelegation=false
osgi.compatibility.bootdelegation=false
osgi.clean=true
osgi.configuration.area=target
+org.osgi.framework.bsnversion=multiple
#osgi.console=2401
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties
index eca2b6a2..929a2469 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties
+++ b/org.eclipse.virgo.kernel.deployer.test/src/test/resources/META-INF/test.config.properties
@@ -32,10 +32,12 @@ launcher.bundles =\
file:../ivy-cache/repository/org.aopalliance/com.springsource.org.aopalliance/1.0.0/com.springsource.org.aopalliance-1.0.0.jar,\
file:../org.eclipse.virgo.kernel.artifact/target/classes@start,\
file:../org.eclipse.virgo.kernel.services/target/classes@start,\
- file:../org.eclipse.virgo.kernel.osgi/target/classes@start,\
file:../org.eclipse.virgo.kernel.deployer/target/classes@start,\
file:../org.eclipse.virgo.kernel.model/target/classes@start,\
- file:../org.eclipse.virgo.kernel.kerneldmfragment/target/classes
+ file:../org.eclipse.virgo.kernel.kerneldmfragment/target/classes,\
+ file:../org.eclipse.virgo.kernel.osgi/target/classes@start,\
+ file:../org.eclipse.virgo.kernel.userregionfactory/target/classes@start
+
org.eclipse.virgo.test.properties.include=file:../build.versions,file:../build.properties
@@ -45,6 +47,7 @@ osgi.context.bootdelegation=false
osgi.compatibility.bootdelegation=false
osgi.clean=true
osgi.configuration.area=target
+org.osgi.framework.bsnversion=multiple
#osgi.console=2401
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 12aee39a..955e7d62 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
@@ -45,12 +45,21 @@ 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.osgi.service.log;version="0",\
org.slf4j;version="[1.6.1,2)"
serviceImports =\
+ org.eclipse.virgo.kernel.osgi.region.Region,\
+ 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,\
@@ -61,36 +70,30 @@ 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,\
org.eclipse.virgo.kernel.osgi.framework.ImportExpander,\
org.eclipse.virgo.kernel.osgi.framework.PackageAdminUtil,\
+ org.eclipse.virgo.kernel.osgi.region.Region,\
org.osgi.service.event.EventHandler,\
org.osgi.service.cm.ConfigurationListener,\
org.osgi.service.cm.ManagedService,\
- org.osgi.service.cm.ManagedServiceFactory
-
-inheritedFrameworkProperties =\
- eclipse.bundle.setTCCL,\
- eclipse.enableStateSaver,\
- org.eclipse.virgo.suppress.heap.dumps,\
- osgi.java.profile,\
- osgi.parentClassloader,\
- osgi.context.bootdelegation,\
- osgi.compatibility.bootdelegation,\
- osgi.java.profile.bootdelegation,\
- osgi.hook.configurators.include
-
-# osgi.console=2401
+ org.osgi.service.cm.ManagedServiceFactory,\
+ org.osgi.framework.BundleContext

Back to the top