User: user57
Date: 01/07/09 19:34:04
Modified: src/main/org/jboss/test/jrmp/test TestCustomSockets.java
TestDynLoading.java
Log:
o changed all deploy tests to deploy as a test and to not call System.exit().
this should allow reports to be generated for tests that fail to deploy.
o modified run_tests.xml basic-security-tests to not-halt on error, so that
test-and-report will produce reports even if the security tests fail.
Revision Changes Path
1.4 +17 -20
jbosstest/src/main/org/jboss/test/jrmp/test/TestCustomSockets.java
Index: TestCustomSockets.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jrmp/test/TestCustomSockets.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TestCustomSockets.java 2001/07/06 02:29:20 1.3
+++ TestCustomSockets.java 2001/07/10 02:34:04 1.4
@@ -18,7 +18,7 @@
container invoker.
@author [EMAIL PROTECTED]
-@version $Revision: 1.3 $
+@version $Revision: 1.4 $
*/
public class TestCustomSockets extends junit.framework.TestCase
{
@@ -61,24 +61,21 @@
bean.remove();
}
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- try {
- String filename = "../deploy/jrmp-comp.jar";
- System.out.println("Deploying...");
- Deploy.deploy(filename);
+ /**
+ * Setup the test suite.
+ */
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ // add a test case to deploy our support applications
+ String filename = "jrmp-comp.jar";
+ suite.addTest(new Deploy.Deployer(filename));
+
+ suite.addTest(new TestSuite(TestCustomSockets.class));
+
+ // add a test case to undeploy our support applications
+ suite.addTest(new Deploy.Undeployer(filename));
- suite.addTest(new TestSuite(TestCustomSockets.class));
-
- // add a test case to undeploy our support applications
- suite.addTest(new Deploy.Undeployer(filename));
- }
- catch (Throwable t) {
- t.printStackTrace();
- System.exit(0);
- }
-
- return suite;
- }
+ return suite;
+ }
}
1.3 +45 -48 jbosstest/src/main/org/jboss/test/jrmp/test/TestDynLoading.java
Index: TestDynLoading.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/jrmp/test/TestDynLoading.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- TestDynLoading.java 2001/07/06 02:29:20 1.2
+++ TestDynLoading.java 2001/07/10 02:34:04 1.3
@@ -19,56 +19,53 @@
/** Test of RMI dynamic class loading.
@author [EMAIL PROTECTED]
-@version $Revision: 1.2 $
+@version $Revision: 1.3 $
*/
-public class TestDynLoading extends junit.framework.TestCase
+public class TestDynLoading
+ extends TestCase
{
- public TestDynLoading(String name)
- {
- super(name);
- System.out.println("TestDynLoading");
- }
-
- protected void setUp() throws Exception
- {
- // System.out.println("TestDynLoading.setup(jrmp-dl.jar)");
- // Deploy.deploy("jrmp-dl.jar");
- }
-
- public void testAccess() throws Exception
- {
- InitialContext jndiContext = new InitialContext();
- System.out.println("Lookup StatefulSession");
- Object obj = jndiContext.lookup("StatefulSession");
- StatelessSessionHome home = (StatelessSessionHome) obj;
- System.out.println("Found StatefulSession Home");
- StatelessSession bean = home.create();
- System.out.println("Created StatefulSession");
- IString echo = bean.copy("jrmp-dl");
- System.out.println("bean.copy(jrmp-dl) = "+echo);
- System.out.println("IString.class = "+echo.getClass());
- bean.remove();
- }
-
- public static Test suite() {
- TestSuite suite = new TestSuite();
-
- try {
- String filename = "../deploy/jrmp-dl.jar";
- System.out.println("Deploying...");
- Deploy.deploy(filename);
-
- suite.addTest(new TestSuite(TestDynLoading.class));
-
- // add a test case to undeploy our support applications
- suite.addTest(new Deploy.Undeployer(filename));
- }
- catch (Throwable t) {
- t.printStackTrace();
- System.exit(0);
- }
+ public TestDynLoading(String name)
+ {
+ super(name);
+ System.out.println("TestDynLoading");
+ }
+
+ protected void setUp() throws Exception
+ {
+ // System.out.println("TestDynLoading.setup(jrmp-dl.jar)");
+ // Deploy.deploy("jrmp-dl.jar");
+ }
+
+ public void testAccess() throws Exception
+ {
+ InitialContext jndiContext = new InitialContext();
+ System.out.println("Lookup StatefulSession");
+ Object obj = jndiContext.lookup("StatefulSession");
+ StatelessSessionHome home = (StatelessSessionHome) obj;
+ System.out.println("Found StatefulSession Home");
+ StatelessSession bean = home.create();
+ System.out.println("Created StatefulSession");
+ IString echo = bean.copy("jrmp-dl");
+ System.out.println("bean.copy(jrmp-dl) = "+echo);
+ System.out.println("IString.class = "+echo.getClass());
+ bean.remove();
+ }
+
+ /**
+ * Setup the test suite.
+ */
+ public static Test suite() {
+ TestSuite suite = new TestSuite();
+
+ // add a test case to deploy our support applications
+ String filename = "jrmp-dl.jar";
+ suite.addTest(new Deploy.Deployer(filename));
- return suite;
- }
+ suite.addTest(new TestSuite(TestDynLoading.class));
+ // add a test case to undeploy our support applications
+ suite.addTest(new Deploy.Undeployer(filename));
+
+ return suite;
+ }
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development