User: salborini
Date: 00/10/09 10:54:56
Modified: src/main/org/jboss/test/testbean/test Main.java
Log:
Added a public static void main for continuous testbeans test.
Revision Changes Path
1.3 +47 -2 jbosstest/src/main/org/jboss/test/testbean/test/Main.java
Index: Main.java
===================================================================
RCS file:
/products/cvs/ejboss/jbosstest/src/main/org/jboss/test/testbean/test/Main.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Main.java 2000/09/29 20:17:27 1.2
+++ Main.java 2000/10/09 17:54:56 1.3
@@ -42,7 +42,7 @@
* Sample client for the jboss container.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Id: Main.java,v 1.2 2000/09/29 20:17:27 fleury Exp $
+* @version $Id: Main.java,v 1.3 2000/10/09 17:54:56 salborini Exp $
*/
public class Main
extends junit.framework.TestCase
@@ -54,7 +54,52 @@
public Main(String name) {
super(name);
}
-
+
+ public static void main(String arg[]) {
+ Main main = new Main("loop");
+
+ try {
+ System.setOut(new java.io.PrintStream(new
java.io.FileOutputStream(new java.io.File("loop.out"))));
+ System.setErr(new java.io.PrintStream(new
java.io.FileOutputStream(new java.io.File("loop.err"))));
+
+ main.setUp();
+ int loop = 0;
+
+ while (true) {
+ char[] result = "xxxxxxxx".toCharArray();
+
+ long start = System.currentTimeMillis();
+
+ try { main.testStatelessBean(); } catch (Exception e)
{ result[0] = ' '; }
+ try { main.testStatefulBean(); } catch (Exception e) {
result[1] = ' '; }
+ try { main.testEntityBeanBMP(); } catch (Exception e)
{ result[2] = ' '; }
+ try { main.testEntityBeanCMP(); } catch (Exception e)
{ result[3] = ' '; }
+ try { main.testEntityBeanPK(); } catch (Exception e) {
result[4] = ' '; }
+ try { main.testBeanManagedTransactionDemarcation(); }
catch (Exception e) { result[5] = ' '; }
+ // try { main.testAllTypesBean(); } catch (Exception
e) { result[6] = ' '; }
+ try { main.testTxSession(); } catch (Exception e) {
result[7] = ' '; }
+
+ long end = System.currentTimeMillis();
+
+ String report = (++loop) + " " + new
Date().toString() + " " + String.valueOf(result) + " completed in " + (end-start) +
"ms";
+
+ System.err.println(report);
+
+ System.out.println();
+
System.out.println("#################################################");
+ System.out.println(report);
+
System.out.println("#################################################");
+ System.out.println();
+
+ }
+
+
+ } catch (Exception e) {
+ System.out.println("init failed");
+ }
+ }
+
+
public void testStatelessBean()
throws Exception
{