[jboss-svn-commits] JBL Code SVN: r18787 - in labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests: junit/ba and 1 other directory.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Mar 10 06:24:53 EDT 2008
Author: adinn
Date: 2008-03-10 06:24:52 -0400 (Mon, 10 Mar 2008)
New Revision: 18787
Modified:
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/TestSuite.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java
labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java
Log:
corrected ba tests which were failign to complete participants before cancel. corrected cancel test to do actually call cancel rather than complete! changes for JBTM-339
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/TestSuite.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/TestSuite.java 2008-03-10 06:13:40 UTC (rev 18786)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/TestSuite.java 2008-03-10 10:24:52 UTC (rev 18787)
@@ -39,7 +39,7 @@
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.NullRollbackTransaction.class));
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.PrintTransaction.class));
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.ResumeNullTransaction.class));
- // this test will probably fail because the rollback is tried forever instead of an exception being generated
+ // this test fails because the rollback is tried forever instead of an exception being generated
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.RollbackExceptionInRollback.class));
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SingleParticipant.class));
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.basic.SuspendCommitTransaction.class));
@@ -52,16 +52,11 @@
// wst BA tests
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Cancel.class));
- // this test errors with an unepected RollbackException from the close!
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Close.class));
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Compensate.class));
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.ConfirmWithComplete.class));
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.Exit.class));
- // this test gets the expected SystemException under cancel but the participant does not
- // see the cancel message
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCancel.class));
- // this test gets the expected SystemException under close but the participant does not
- // see the close message
addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiClose.class));
// this test fails because the compensate is retried forever instead of an exception being generated
//addTest(new junit.framework.TestSuite(com.arjuna.wst.tests.junit.ba.MultiCompensate.class));
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java 2008-03-10 06:13:40 UTC (rev 18786)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/Close.java 2008-03-10 10:24:52 UTC (rev 18787)
@@ -49,11 +49,13 @@
{
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
BusinessActivityManager bam = BusinessActivityManager.getBusinessActivityManager();
- DemoBusinessParticipant p = new DemoBusinessParticipant(DemoBusinessParticipant.CLOSE, "1235");
+ com.arjuna.wst.BAParticipantManager bpm = null;
+ DemoBusinessParticipant p = new DemoBusinessParticipant(DemoBusinessParticipant.CLOSE, "1235");
try {
uba.begin();
- bam.enlistForBusinessAgreementWithParticipantCompletion(p, p.identifier());
+ bpm = bam.enlistForBusinessAgreementWithParticipantCompletion(p, p.identifier());
+ bpm.completed();
} catch (Exception eouter) {
try {
uba.cancel();
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java 2008-03-10 06:13:40 UTC (rev 18786)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiCancel.java 2008-03-10 10:24:52 UTC (rev 18787)
@@ -66,7 +66,7 @@
throw eouter;
}
try {
- uba.close();
+ uba.cancel();
} catch (SystemException ex) {
// we should get here
assertTrue(p.passed());
Modified: labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java 2008-03-10 06:13:40 UTC (rev 18786)
+++ labs/jbosstm/trunk/XTS/WSTX/tests/classes/com/arjuna/wst/tests/junit/ba/MultiClose.java 2008-03-10 10:24:52 UTC (rev 18787)
@@ -52,14 +52,18 @@
UserBusinessActivity uba = UserBusinessActivity.getUserBusinessActivity();
BusinessActivityManager bam = BusinessActivityManager.getBusinessActivityManager();
- DemoBusinessParticipant p = new DemoBusinessParticipant(DemoBusinessParticipant.CLOSE, "1240");
+ com.arjuna.wst.BAParticipantManager bpm1 = null;
+ com.arjuna.wst.BAParticipantManager bpm2 = null;
+ DemoBusinessParticipant p = new DemoBusinessParticipant(DemoBusinessParticipant.CLOSE, "1240");
FailureBusinessParticipant fp = new FailureBusinessParticipant(FailureBusinessParticipant.FAIL_IN_CLOSE, "5679");
try {
uba.begin();
- bam.enlistForBusinessAgreementWithParticipantCompletion(p, "1240");
- bam.enlistForBusinessAgreementWithParticipantCompletion(fp, "5679");
+ bpm1 = bam.enlistForBusinessAgreementWithParticipantCompletion(p, "1240");
+ bpm2 = bam.enlistForBusinessAgreementWithParticipantCompletion(fp, "5679");
+ bpm1.completed();
+ bpm2.completed();
} catch (Exception eouter) {
try {
uba.cancel();
More information about the jboss-svn-commits
mailing list