KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > stests > manac > A_simple


1 /*
2  * JOnAS: Java(TM) Open Application Server
3  * Copyright (C) 1999 Bull S.A.
4  * Contact: jonas-team@objectweb.org
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19  * USA
20  *
21  * --------------------------------------------------------------------------
22  * $Id: A_simple.java,v 1.1 2003/12/09 12:37:36 durieuxp Exp $
23  * --------------------------------------------------------------------------
24  */

25
26 package org.objectweb.jonas.stests.manac;
27
28 public abstract class A_simple extends A_manac {
29
30     protected static ManagerHome home = null;
31     protected static Manager manager = null;
32
33     // default values
34
int accounts = 20; // nb of accessed accounts
35
int delay = 3; // seconds
36
int loops = 1; // nb of loops
37
int amount = -10; // withdraw value (initial value is 1000)
38
int threads = 1; // nb of concurrent threads
39
int checklevel = 2; // check accounts after every test
40
int timeout = 30; // transaction timeout
41

42     public A_simple(String JavaDoc name) {
43         super(name);
44     }
45
46     public void testBasic() throws Exception JavaDoc {
47         manac(accounts, delay, loops, amount, threads, checklevel, timeout);
48     }
49
50     public void testBasicLong() throws Exception JavaDoc {
51         loops = 100;
52         manac(accounts, delay, loops, amount, threads, checklevel, timeout);
53     }
54
55     public void testT2() throws Exception JavaDoc {
56         threads = 2;
57         loops = 10;
58         manac(accounts, delay, loops, amount, threads, checklevel, timeout);
59     }
60
61     public void testT4() throws Exception JavaDoc {
62         threads = 4;
63         loops = 10;
64         manac(accounts, delay, loops, amount, threads, checklevel, timeout);
65     }
66
67 }
68
Popular Tags