001: /*
002: * JBoss, Home of Professional Open Source.
003: * Copyright 2006, Red Hat Middleware LLC, and individual contributors
004: * as indicated by the @author tags. See the copyright.txt file in the
005: * distribution for a full listing of individual contributors.
006: *
007: * This is free software; you can redistribute it and/or modify it
008: * under the terms of the GNU Lesser General Public License as
009: * published by the Free Software Foundation; either version 2.1 of
010: * the License, or (at your option) any later version.
011: *
012: * This software is distributed in the hope that it will be useful,
013: * but WITHOUT ANY WARRANTY; without even the implied warranty of
014: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
015: * Lesser General Public License for more details.
016: *
017: * You should have received a copy of the GNU Lesser General Public
018: * License along with this software; if not, write to the Free
019: * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
020: * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
021: */
022: package org.jboss.test.lock.test;
023:
024: import junit.framework.Test;
025: import junit.framework.TestCase;
026: import junit.framework.TestSuite;
027:
028: import org.jboss.test.JBossTestCase;
029:
030: /**
031: * #Description of the Class
032: */
033: public class EnterpriseEntityStressTestCase extends JBossTestCase {
034: /**
035: * Constructor for the EnterpriseEntityStressTestCase object
036: *
037: * @param name Description of Parameter
038: */
039: public EnterpriseEntityStressTestCase(String name) {
040: super (name);
041: }
042:
043: /**
044: * Setup the test suite.
045: *
046: * @return The test suite
047: */
048: public static Test suite() throws Exception {
049: TestSuite suite = new TestSuite();
050:
051: // Test ejb.plugins.lock.QueuedPessimisticEJBLock
052: suite.addTest(new TestSuite(Entity_Option_A_Test.class));
053: suite.addTest(new TestSuite(Entity_Option_B_Test.class));
054: suite.addTest(new TestSuite(Entity_Option_C_Test.class));
055: /* FIXME: These tests are broken
056: suite.addTest(new TestSuite(Entity_Option_D_Test.class));
057:
058: suite.addTest(new TestSuite(Entity_Option_C_Multi_Test.class));
059: */
060:
061: return getDeploySetup(suite, "locktest.jar");
062: }
063:
064: /**
065: * #Description of the Class
066: */
067: public static class Entity_Option_A_Test extends
068: EnterpriseEntityTest {
069: /**
070: * Constructor for the Entity_Option_A_Test object
071: *
072: * @param name Description of Parameter
073: */
074: public Entity_Option_A_Test(String name) {
075: super (name, "EnterpriseEntity_A");
076: }
077: }
078:
079: /**
080: * #Description of the Class
081: */
082: public static class Entity_Option_B_Test extends
083: EnterpriseEntityTest {
084: /**
085: * Constructor for the Entity_Option_B_Test object
086: *
087: * @param name Description of Parameter
088: */
089: public Entity_Option_B_Test(String name) {
090: super (name, "EnterpriseEntity_B");
091: }
092:
093: public void testB2B() throws Exception {
094: // This test will not work with commit-option B, because
095: // all fields of the entity bean are nulled out on activation
096: }
097:
098: }
099:
100: /**
101: * #Description of the Class
102: */
103: public static class Entity_Option_C_Test extends
104: EnterpriseEntityTest {
105: /**
106: * Constructor for the Entity_Option_C_Test object
107: *
108: * @param name Description of Parameter
109: */
110: public Entity_Option_C_Test(String name) {
111: super (name, "EnterpriseEntity_C");
112: }
113:
114: public void testB2B() throws Exception {
115: // This test will not work with commit-option C, because
116: // all fields of the entity bean are nulled out on activation
117: }
118: }
119:
120: /**
121: * #Description of the Class
122: */
123: public static class Entity_Option_D_Test extends
124: EnterpriseEntityTest {
125: // This test will not work a cache invalidation nulls the data
126:
127: /**
128: * Constructor for the Entity_Option_D_Test object
129: *
130: * @param name Description of Parameter
131: */
132: public Entity_Option_D_Test(String name) {
133: super (name, "EnterpriseEntity_D");
134: }
135: }
136:
137: /**
138: * #Description of the Class
139: */
140: public static class Entity_Option_B_Multi_Test extends
141: EnterpriseEntityTest {
142: /**
143: * Constructor for the Entity_Option_B_Multi_Test object
144: *
145: * @param name Description of Parameter
146: */
147: public Entity_Option_B_Multi_Test(String name) {
148: super (name, "EnterpriseEntity_B_Multi");
149: }
150:
151: public void testB2B() throws Exception {
152: // This test will not work with commit-option B, because
153: // all fields of the entity bean are nulled out on activation
154: }
155: }
156:
157: /**
158: * #Description of the Class
159: */
160: public static class Entity_Option_C_Multi_Test extends
161: EnterpriseEntityTest {
162: /**
163: * Constructor for the Entity_Option_C_Multi_Test object
164: *
165: * @param name Description of Parameter
166: */
167: public Entity_Option_C_Multi_Test(String name) {
168: super (name, "EnterpriseEntity_C_Multi");
169: }
170:
171: public void testB2B() throws Exception {
172: // This test will not work with commit-option C, because
173: // all fields of the entity bean are nulled out on activation
174: }
175: }
176:
177: }
|