You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicemix.apache.org by gn...@apache.org on 2008/10/26 10:36:48 UTC
svn commit: r707958 -
/servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java
Author: gnodet
Date: Sun Oct 26 02:36:48 2008
New Revision: 707958
URL: http://svn.apache.org/viewvc?rev=707958&view=rev
Log:
Fix integration tests
Modified:
servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java
Modified: servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java
URL: http://svn.apache.org/viewvc/servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java?rev=707958&r1=707957&r2=707958&view=diff
==============================================================================
--- servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java (original)
+++ servicemix/smx4/kernel/trunk/testing/itests/src/test/java/org/apache/servicemix/kernel/testing/itests/SimpleTest.java Sun Oct 26 02:36:48 2008
@@ -40,7 +40,7 @@
* point for such use cases that doesn't require duplication
* of the entire manifest...
*/
- protected String getManifestLocation() {
+ protected String getManifestLocation() {
return "classpath:org/apache/servicemix/MANIFEST.MF";
}
@@ -69,12 +69,12 @@
protected String[] getTestFrameworkBundlesNames() {
return new String[] {
getBundle("org.apache.geronimo.specs", "geronimo-servlet_2.5_spec"),
+ getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxp-api-1.3"),
+ getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.stax-api-1.0"),
getBundle("org.apache.felix", "org.osgi.compendium"),
getBundle("org.apache.felix", "org.apache.felix.configadmin"),
getBundle("org.ops4j.pax.logging", "pax-logging-api"),
getBundle("org.ops4j.pax.logging", "pax-logging-service"),
- //getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.jaxp-api-1.3"),
- //getBundle("org.apache.servicemix.specs", "org.apache.servicemix.specs.stax-api-1.0"),
getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxp-ri"),
getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.aopalliance"),
getBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.asm"),
@@ -100,9 +100,11 @@
} catch (Throwable t) {
}
Bundle b = installBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxp-ri", null, "jar");
- Thread.sleep(100);
- assertNotNull(DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument());
- b.uninstall();
+ try {
+ assertNotNull(DocumentBuilderFactory.newInstance().newDocumentBuilder().newDocument());
+ } finally {
+ b.uninstall();
+ }
}
public void testTransformerFactory() throws Exception {
@@ -112,9 +114,11 @@
} catch (Throwable t) {
}
Bundle b = installBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxp-ri", null, "jar");
- Thread.sleep(100);
- assertNotNull(TransformerFactory.newInstance().newTransformer());
- b.uninstall();
+ try {
+ assertNotNull(TransformerFactory.newInstance().newTransformer());
+ } finally {
+ b.uninstall();
+ }
}
public void testSchemaFactory() throws Exception {
@@ -124,9 +128,11 @@
} catch (Throwable t) {
}
Bundle b = installBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxp-ri", null, "jar");
- Thread.sleep(100);
- assertNotNull(SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema").newSchema());
- b.uninstall();
+ try {
+ assertNotNull(SchemaFactory.newInstance("http://www.w3.org/2001/XMLSchema").newSchema());
+ } finally {
+ b.uninstall();
+ }
}
public void testStax() throws Exception {
@@ -136,8 +142,11 @@
} catch (Throwable t) {
}
Bundle b = installBundle("org.apache.servicemix.bundles", "org.apache.servicemix.bundles.jaxp-ri", null, "jar");
- assertNotNull(XMLInputFactory.newInstance());
- b.uninstall();
+ try {
+ assertNotNull(XMLInputFactory.newInstance());
+ } finally {
+ b.uninstall();
+ }
}
}