FELIX-3651 simplify import-package in test probe bundle preparatory to location binding tests
git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1487634 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/ActivateSignatureTest.java b/scr/src/test/java/org/apache/felix/scr/integration/ActivateSignatureTest.java
index 2f6c623..d3337fd 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/ActivateSignatureTest.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/ActivateSignatureTest.java
@@ -40,6 +40,7 @@
{
// use different components
descriptorFile = "/integration_test_signature_components.xml";
+ COMPONENT_PACKAGE = COMPONENT_PACKAGE + ".activatesignature";
// uncomment to enable debugging of this test class
// paxRunnerVmOption = DEBUG_VM_OPTION;
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/CircularReferenceTest.java b/scr/src/test/java/org/apache/felix/scr/integration/CircularReferenceTest.java
index a44f911..6ff7e3b 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/CircularReferenceTest.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/CircularReferenceTest.java
@@ -46,7 +46,8 @@
// paxRunnerVmOption = DEBUG_VM_OPTION;
descriptorFile = "/integration_test_circular.xml";
- }
+ COMPONENT_PACKAGE = COMPONENT_PACKAGE + ".circular";
+ }
/**
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java b/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java
index f4fefbc..1569bd3 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/ComponentConcurrencyTest.java
@@ -30,6 +30,7 @@
// uncomment to enable debugging of this test class
// paxRunnerVmOption = DEBUG_VM_OPTION;
descriptorFile = "/integration_test_component_concurrency.xml";
+ COMPONENT_PACKAGE = COMPONENT_PACKAGE + ".concurrency";
}
@Inject
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java b/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
index 62ac025..7f7011b 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/ComponentTestBase.java
@@ -111,6 +111,8 @@
// the descriptor file to use for the installed test bundle
protected static String descriptorFile = "/integration_test_simple_components.xml";
+ protected static String COMPONENT_PACKAGE = "org.apache.felix.scr.integration.components";
+
protected static boolean NONSTANDARD_COMPONENT_FACTORY_BEHAVIOR = false;
protected volatile Log log;
@@ -180,7 +182,7 @@
configAdminTracker = new ServiceTracker( bundleContext, "org.osgi.service.cm.ConfigurationAdmin", null );
configAdminTracker.open();
- bundle = installBundle( descriptorFile );
+ bundle = installBundle( descriptorFile, COMPONENT_PACKAGE );
bundle.start();
}
@@ -399,20 +401,14 @@
}
- protected Bundle installBundle( final String descriptorFile ) throws BundleException
+ protected Bundle installBundle( final String descriptorFile, String componentPackage ) throws BundleException
{
final InputStream bundleStream = bundle()
.add("OSGI-INF/components.xml", getClass().getResource(descriptorFile))
.set(Constants.BUNDLE_SYMBOLICNAME, "simplecomponent")
.set(Constants.BUNDLE_VERSION, "0.0.11")
- .set(Constants.IMPORT_PACKAGE,
- "org.apache.felix.scr.integration.components," +
- "org.apache.felix.scr.integration.components.activatesignature," +
- "org.apache.felix.scr.integration.components.circular," +
- "org.apache.felix.scr.integration.components.concurrency," +
- "org.apache.felix.scr.integration.components.felix3680," +
- "org.apache.felix.scr.integration.components.felix3680_2")
+ .set(Constants.IMPORT_PACKAGE, componentPackage)
.set("Service-Component", "OSGI-INF/components.xml")
.build(withBnd());
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java b/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
index 1834918..f75730f 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/Felix3680Test.java
@@ -41,6 +41,7 @@
// uncomment to enable debugging of this test class
// paxRunnerVmOption = DEBUG_VM_OPTION;
descriptorFile = "/integration_test_FELIX_3680.xml";
+ COMPONENT_PACKAGE = COMPONENT_PACKAGE + ".felix3680";
restrictedLogging = true;
//comment to get debug logging if the test fails.
// DS_LOGLEVEL = "warn";
diff --git a/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java b/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java
index c232ca6..413c50a 100644
--- a/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java
+++ b/scr/src/test/java/org/apache/felix/scr/integration/Felix3680_2Test.java
@@ -40,6 +40,7 @@
// uncomment to enable debugging of this test class
// paxRunnerVmOption = DEBUG_VM_OPTION;
descriptorFile = "/integration_test_FELIX_3880_2.xml";
+ COMPONENT_PACKAGE = COMPONENT_PACKAGE + ".felix3680_2";
restrictedLogging = true;
// Comment this for displaying debug messages