You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by da...@apache.org on 2004/09/05 23:05:07 UTC
cvs commit: incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment RAR_1_0ConfigBuilderTest.java RAR_1_5ConfigBuilderTest.java RAR_1_5DConfigBeanTest.java
dain 2004/09/05 14:05:07
Modified: . maven.xml
modules/connector project.properties
modules/connector/src/test/org/apache/geronimo/connector/deployment
RAR_1_0ConfigBuilderTest.java
RAR_1_5ConfigBuilderTest.java
RAR_1_5DConfigBeanTest.java
Log:
Tests can now run without forking
Revision Changes Path
1.81 +9 -1 incubator-geronimo/maven.xml
Index: maven.xml
===================================================================
RCS file: /home/cvs/incubator-geronimo/maven.xml,v
retrieving revision 1.80
retrieving revision 1.81
diff -u -r1.80 -r1.81
--- maven.xml 5 Sep 2004 04:55:05 -0000 1.80
+++ maven.xml 5 Sep 2004 21:05:06 -0000 1.81
@@ -208,6 +208,10 @@
<modules:reactor goals="build"/>
</goal>
+ <goal name="modules:test">
+ <modules:reactor goals="test"/>
+ </goal>
+
<goal name="modules:site">
<modules:reactor goals="site"/>
</goal>
@@ -284,6 +288,10 @@
<goal name="default">
<attainGoal name="modules:default"/>
+ </goal>
+
+ <goal name="test">
+ <attainGoal name="modules:test"/>
</goal>
<goal name="eclipse">
1.8 +4 -2 incubator-geronimo/modules/connector/project.properties
Index: project.properties
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/connector/project.properties,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- project.properties 5 Sep 2004 06:09:10 -0000 1.7
+++ project.properties 5 Sep 2004 21:05:06 -0000 1.8
@@ -9,4 +9,6 @@
# Include the generated xmlbean classes in the eclipse classpath
maven.eclipse.classpath.include=target/xmlbeans
-maven.junit.fork=true
+# Pass basedir of this module as a system property to tests
+maven.junit.sysproperties=geronimo.test.basedir
+geronimo.test.basedir=${basedir}
1.15 +14 -13 incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java
Index: RAR_1_0ConfigBuilderTest.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_0ConfigBuilderTest.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- RAR_1_0ConfigBuilderTest.java 9 Aug 2004 04:19:36 -0000 1.14
+++ RAR_1_0ConfigBuilderTest.java 5 Sep 2004 21:05:06 -0000 1.15
@@ -63,6 +63,7 @@
* @version $Revision$ $Date$
*/
public class RAR_1_0ConfigBuilderTest extends TestCase {
+ private static final File basedir = new File(System.getProperty("geronimo.test.basedir", System.getProperty("user.dir")));
private URL j2eeDD;
private URL geronimoDD;
XmlOptions xmlOptions;
@@ -89,7 +90,7 @@
public void testBuildUnpackedModule() throws Exception {
InstallAction action = new InstallAction() {
- private File rarFile = new File("target/test-rar-10");
+ private File rarFile = new File(basedir, "target/test-rar-10");
public File getRARFile() {
return rarFile;
}
@@ -102,7 +103,7 @@
public void testBuildUnpackedAltSpecDDModule() throws Exception {
InstallAction action = new InstallAction() {
- private File rarFile = new File("target/test-rar-10");
+ private File rarFile = new File(basedir, "target/test-rar-10");
public File getRARFile() {
return rarFile;
}
@@ -110,9 +111,9 @@
// Resets the vendor DD, such that it will be reloaded.
module.setVendorDD(null);
// this file does not exist, one expects a DeploymentException.
- module.setAltSpecDD(new File("target/test-rar-10/dummy.xml").toURL());
+ module.setAltSpecDD(new File(basedir, "target/test-rar-10/dummy.xml").toURL());
// this file exists
- module.setAltVendorDD(new File("target/test-rar-10/META-INF/geronimo-ra.xml").toURL());
+ module.setAltVendorDD(new File(basedir, "target/test-rar-10/META-INF/geronimo-ra.xml").toURL());
moduleBuilder.installModule(rarFile, earContext, module);
}
};
@@ -125,7 +126,7 @@
public void testBuildUnpackedAltVendorDDModule() throws Exception {
InstallAction action = new InstallAction() {
- private File rarFile = new File("target/test-rar-10");
+ private File rarFile = new File(basedir, "target/test-rar-10");
public File getRARFile() {
return rarFile;
}
@@ -133,9 +134,9 @@
// Resets the vendor DD, such that it will be reloaded.
module.setVendorDD(null);
// this file exists
- module.setAltSpecDD(new File("target/test-rar-10/META-INF/ra.xml").toURL());
+ module.setAltSpecDD(new File(basedir, "target/test-rar-10/META-INF/ra.xml").toURL());
// this file does not exist, one expects a DeploymentException.
- module.setAltVendorDD(new File("target/test-rar-10/dummy.xml").toURL());
+ module.setAltVendorDD(new File(basedir, "target/test-rar-10/dummy.xml").toURL());
moduleBuilder.installModule(rarFile, earContext, module);
}
};
@@ -148,7 +149,7 @@
public void testBuildUnpackedAltSpecVendorDDModule() throws Exception {
InstallAction action = new InstallAction() {
- private File rarFile = new File("target/test-rar-10");
+ private File rarFile = new File(basedir, "target/test-rar-10");
public File getRARFile() {
return rarFile;
}
@@ -156,9 +157,9 @@
// Resets the vendor DD, such that it will be reloaded.
module.setVendorDD(null);
// this file exists
- module.setAltSpecDD(new File("target/test-rar-10/META-INF/ra.xml").toURL());
+ module.setAltSpecDD(new File(basedir, "target/test-rar-10/META-INF/ra.xml").toURL());
// this file exists
- module.setAltVendorDD(new File("target/test-rar-10/META-INF/geronimo-ra.xml").toURL());
+ module.setAltVendorDD(new File(basedir, "target/test-rar-10/META-INF/geronimo-ra.xml").toURL());
moduleBuilder.installModule(rarFile, earContext, module);
}
};
@@ -167,7 +168,7 @@
public void testBuildPackedModule() throws Exception {
InstallAction action = new InstallAction() {
- private File rarFile = new File("target/test-rar-10.rar");
+ private File rarFile = new File(basedir, "target/test-rar-10.rar");
public File getRARFile() {
return rarFile;
}
@@ -382,7 +383,7 @@
}
protected void setUp() throws Exception {
- File docDir = new File("src/test-data/connector_1_0");
+ File docDir = new File(basedir, "src/test-data/connector_1_0");
j2eeDD = new File(docDir, "ra.xml").toURL();
geronimoDD = new File(docDir, "geronimo-ra.xml").toURL();
xmlOptions = new XmlOptions();
1.20 +5 -4 incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java
Index: RAR_1_5ConfigBuilderTest.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_5ConfigBuilderTest.java,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- RAR_1_5ConfigBuilderTest.java 9 Aug 2004 04:08:19 -0000 1.19
+++ RAR_1_5ConfigBuilderTest.java 5 Sep 2004 21:05:07 -0000 1.20
@@ -63,6 +63,7 @@
* @version $Revision$ $Date$
*/
public class RAR_1_5ConfigBuilderTest extends TestCase {
+ private static final File basedir = new File(System.getProperty("geronimo.test.basedir", System.getProperty("user.dir")));
private URL j2eeDD;
private URL geronimoDD;
private XmlOptions xmlOptions;
@@ -88,7 +89,7 @@
public void testBuildUnpackedModule() throws Exception {
InstallAction action = new InstallAction() {
- private File rarFile = new File("target/test-rar-15");
+ private File rarFile = new File(basedir, "target/test-rar-15");
public File getRARFile() {
return rarFile;
}
@@ -102,7 +103,7 @@
public void testBuildPackedModule() throws Exception {
InstallAction action = new InstallAction() {
- private File rarFile = new File("target/test-rar-15.rar");
+ private File rarFile = new File(basedir, "target/test-rar-15.rar");
public File getRARFile() {
return rarFile;
}
@@ -367,7 +368,7 @@
}
protected void setUp() throws Exception {
- File docDir = new File("src/test-data/connector_1_5");
+ File docDir = new File(basedir, "src/test-data/connector_1_5");
j2eeDD = new File(docDir, "ra.xml").toURL();
geronimoDD = new File(docDir, "geronimo-ra.xml").toURL();
xmlOptions = new XmlOptions();
1.5 +3 -2 incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_5DConfigBeanTest.java
Index: RAR_1_5DConfigBeanTest.java
===================================================================
RCS file: /home/cvs/incubator-geronimo/modules/connector/src/test/org/apache/geronimo/connector/deployment/RAR_1_5DConfigBeanTest.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RAR_1_5DConfigBeanTest.java 6 May 2004 03:59:55 -0000 1.4
+++ RAR_1_5DConfigBeanTest.java 5 Sep 2004 21:05:07 -0000 1.5
@@ -56,6 +56,7 @@
*
* */
public class RAR_1_5DConfigBeanTest extends TestCase {
+ private static final File basedir = new File(System.getProperty("geronimo.test.basedir", System.getProperty("user.dir")));
private URL j2eeDD;
XmlOptions xmlOptions;
private List errors;
@@ -175,7 +176,7 @@
protected void setUp() throws Exception {
- File docDir = new File("src/test-data/connector_1_5");
+ File docDir = new File(basedir, "src/test-data/connector_1_5");
j2eeDD = new File(docDir, "ra.xml").toURL();
xmlOptions = new XmlOptions();
xmlOptions.setLoadLineNumbers();