Author: thomas.diesler(a)jboss.com
Date: 2009-11-13 14:06:29 -0500 (Fri, 13 Nov 2009)
New Revision: 96369
Modified:
projects/jboss-osgi/trunk/reactor/framework/pom.xml
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/classloader/BundleClassPathTest.java
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTest.java
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/AbstractResolverTest.java
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java
Log:
Push bootstrap config property to POM rather than duplicating it in every test case
Modified: projects/jboss-osgi/trunk/reactor/framework/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/reactor/framework/pom.xml 2009-11-13 18:20:18 UTC (rev
96368)
+++ projects/jboss-osgi/trunk/reactor/framework/pom.xml 2009-11-13 19:06:29 UTC (rev
96369)
@@ -418,6 +418,10 @@
<value>${project.build.directory}</value>
</property>
<property>
+ <name>org.jboss.osgi.framework.launch.bootstrapPath</name>
+ <value>bootstrap/jboss-osgi-bootstrap.xml</value>
+ </property>
+ <property>
<name>org.jboss.osgi.husky.Invoker</name>
<value>org.jboss.osgi.husky.internal.OSGiInvoker</value>
</property>
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/classloader/BundleClassPathTest.java
===================================================================
---
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/classloader/BundleClassPathTest.java 2009-11-13
18:20:18 UTC (rev 96368)
+++
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/classloader/BundleClassPathTest.java 2009-11-13
19:06:29 UTC (rev 96369)
@@ -41,11 +41,6 @@
*/
public class BundleClassPathTest extends OSGiTest
{
- public void setUp()
- {
- System.setProperty("org.jboss.osgi.framework.launch.bootstrapPath",
"bootstrap/jboss-osgi-bootstrap.xml");
- }
-
@Test
public void testBundleClassPath() throws Exception
{
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java
===================================================================
---
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java 2009-11-13
18:20:18 UTC (rev 96368)
+++
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleBundleTestCase.java 2009-11-13
19:06:29 UTC (rev 96369)
@@ -46,11 +46,6 @@
*/
public class SimpleBundleTestCase
{
- public void setUp()
- {
- System.setProperty("org.jboss.osgi.framework.launch.bootstrapPath",
"bootstrap/jboss-osgi-bootstrap.xml");
- }
-
@Test
public void testBundleInstallLauchAPI() throws Exception
{
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTest.java
===================================================================
---
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTest.java 2009-11-13
18:20:18 UTC (rev 96368)
+++
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/integration/simple/SimpleLogServiceTest.java 2009-11-13
19:06:29 UTC (rev 96369)
@@ -51,7 +51,6 @@
public void setUp()
{
System.clearProperty("simple-logservice-bundle");
- System.setProperty("org.jboss.osgi.framework.launch.bootstrapPath",
"bootstrap/jboss-osgi-bootstrap.xml");
}
@Test
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java
===================================================================
---
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java 2009-11-13
18:20:18 UTC (rev 96368)
+++
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/launch/FrameworkLaunchTestCase.java 2009-11-13
19:06:29 UTC (rev 96369)
@@ -40,11 +40,6 @@
*/
public class FrameworkLaunchTestCase
{
- public void setUp()
- {
- System.setProperty("org.jboss.osgi.framework.launch.bootstrapPath",
"bootstrap/jboss-osgi-bootstrap.xml");
- }
-
@Test
public void testFrameworkLaunch() throws BundleException
{
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/AbstractResolverTest.java
===================================================================
---
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/AbstractResolverTest.java 2009-11-13
18:20:18 UTC (rev 96368)
+++
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/AbstractResolverTest.java 2009-11-13
19:06:29 UTC (rev 96369)
@@ -48,8 +48,6 @@
@BeforeClass
public static void beforeClass() throws BundleException
{
- System.setProperty("org.jboss.osgi.framework.launch.bootstrapPath",
"bootstrap/jboss-osgi-bootstrap.xml");
-
OSGiBootstrapProvider bootProvider = OSGiBootstrap.getBootstrapProvider();
framework = (OSGiFramework)bootProvider.getFramework();
framework.start();
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java
===================================================================
---
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java 2009-11-13
18:20:18 UTC (rev 96368)
+++
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/ResolverSmokeTest.java 2009-11-13
19:06:29 UTC (rev 96369)
@@ -50,11 +50,6 @@
*/
public class ResolverSmokeTest extends OSGiTest
{
- public void setUp()
- {
- System.setProperty("org.jboss.osgi.framework.launch.bootstrapPath",
"bootstrap/jboss-osgi-bootstrap.xml");
- }
-
@Test
public void testBundleResolver() throws BundleException
{
Modified:
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java
===================================================================
---
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java 2009-11-13
18:20:18 UTC (rev 96368)
+++
projects/jboss-osgi/trunk/reactor/framework/src/test/java/org/jboss/test/osgi/resolver/RuleBasedResolverTest.java 2009-11-13
19:06:29 UTC (rev 96369)
@@ -65,24 +65,33 @@
// Import-Package: org.jboss.test.osgi.classloader.support.a
VirtualFile fileA = assembleBundle("bundleA",
"/bundles/resolver/simpleimport");
Bundle bundleA = framework.installBundle(fileA);
+ try
+ {
+ // Bundle-SymbolicName: resolver-simpleexport
+ // Import-Package: org.jboss.test.osgi.classloader.support.a
+ VirtualFile fileB = assembleBundle("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = framework.installBundle(fileB);
+ try
+ {
+ Resolver resolver = getResolver();
+ Resolvable resolvableA = resolver.getBundle(bundleA);
+ assertTrue("BundleA resolved", resolvableA.isResolved());
+ ImportPackage importPackage =
resolvableA.getImportPackage(A.class.getPackage().getName());
+ assertNotNull("Exporter not null", importPackage.getExporter());
- // Bundle-SymbolicName: resolver-simpleexport
- // Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleBundle("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = framework.installBundle(fileB);
-
- Resolver resolver = getResolver();
- Resolvable resolvableA = resolver.getBundle(bundleA);
- assertTrue("BundleA resolved", resolvableA.isResolved());
- ImportPackage importPackage =
resolvableA.getImportPackage(A.class.getPackage().getName());
- assertNotNull("Exporter not null", importPackage.getExporter());
-
- Resolvable resolvableB = resolver.getBundle(bundleB);
- assertTrue("BundleB resolved", resolvableB.isResolved());
- ExportPackage exportPackage =
resolvableB.getExportPackage(A.class.getPackage().getName());
- assertEquals("Importers not null", 1,
exportPackage.getImporters().size());
-
- bundleB.uninstall();
- bundleA.uninstall();
+ Resolvable resolvableB = resolver.getBundle(bundleB);
+ assertTrue("BundleB resolved", resolvableB.isResolved());
+ ExportPackage exportPackage =
resolvableB.getExportPackage(A.class.getPackage().getName());
+ assertEquals("Importers not null", 1,
exportPackage.getImporters().size());
+ }
+ finally
+ {
+ bundleB.uninstall();
+ }
+ }
+ finally
+ {
+ bundleA.uninstall();
+ }
}
}
\ No newline at end of file