geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From djen...@apache.org
Subject cvs commit: incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager MockResource.java MockResourceManager.java TestTransactionManager.java XidImporterTest.java
Date Tue, 08 Jun 2004 20:14:39 GMT
djencks     2004/06/08 13:14:39

  Modified:    modules/transaction/src/test/org/apache/geronimo/transaction
                        TransactionManagerProxyTest.java
               modules/transaction/src/test/org/apache/geronimo/transaction/manager
                        MockResource.java MockResourceManager.java
                        TestTransactionManager.java XidImporterTest.java
  Log:
  supply name to MockResource
  
  Revision  Changes    Path
  1.2       +5 -5      incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java
  
  Index: TransactionManagerProxyTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/TransactionManagerProxyTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TransactionManagerProxyTest.java	25 Feb 2004 18:05:51 -0000	1.1
  +++ TransactionManagerProxyTest.java	8 Jun 2004 20:14:39 -0000	1.2
  @@ -35,11 +35,11 @@
   public class TransactionManagerProxyTest extends TestCase {
   
       MockResourceManager rm1 = new MockResourceManager(true);
  -    MockResource r1_1 = new MockResource(rm1);
  -    MockResource r1_2 = new MockResource(rm1);
  +    MockResource r1_1 = new MockResource(rm1, "rm1");
  +    MockResource r1_2 = new MockResource(rm1, "rm1");
       MockResourceManager rm2 = new MockResourceManager(true);
  -    MockResource r2_1 = new MockResource(rm2);
  -    MockResource r2_2 = new MockResource(rm2);
  +    MockResource r2_1 = new MockResource(rm2, "rm2");
  +    MockResource r2_2 = new MockResource(rm2, "rm2");
   
       TransactionManagerProxy tm = new TransactionManagerProxy();
   
  
  
  
  1.6       +5 -4      incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/MockResource.java
  
  Index: MockResource.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/MockResource.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- MockResource.java	8 Jun 2004 17:33:43 -0000	1.5
  +++ MockResource.java	8 Jun 2004 20:14:39 -0000	1.6
  @@ -27,7 +27,7 @@
    * @version $Revision$ $Date$
    */
   public class MockResource implements NamedXAResource {
  -    private String name = "mockResource";
  +    private String xaResourceName = "mockResource";
       private Xid xid;
       private MockResourceManager manager;
       private int timeout = 0;
  @@ -35,8 +35,9 @@
       private boolean committed;
       private boolean rolledback;
   
  -    public MockResource(MockResourceManager manager) {
  +    public MockResource(MockResourceManager manager, String xaResourceName) {
           this.manager = manager;
  +        this.xaResourceName = xaResourceName;
       }
   
       public int getTransactionTimeout() throws XAException {
  @@ -112,7 +113,7 @@
       }
   
       public String getName() {
  -        return name;
  +        return xaResourceName;
       }
   
   }
  
  
  
  1.4       +3 -3      incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/MockResourceManager.java
  
  Index: MockResourceManager.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/MockResourceManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- MockResourceManager.java	10 Mar 2004 09:59:37 -0000	1.3
  +++ MockResourceManager.java	8 Jun 2004 20:14:39 -0000	1.4
  @@ -38,8 +38,8 @@
           this.willCommit = willCommit;
       }
   
  -    public MockResource getResource() {
  -        return new MockResource(this);
  +    public MockResource getResource(String xaResourceName) {
  +        return new MockResource(this, xaResourceName);
       }
   
       public void join(Xid xid, XAResource xaRes) throws XAException {
  
  
  
  1.4       +2 -2      incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java
  
  Index: TestTransactionManager.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/TestTransactionManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestTransactionManager.java	10 Mar 2004 09:59:37 -0000	1.3
  +++ TestTransactionManager.java	8 Jun 2004 20:14:39 -0000	1.4
  @@ -94,7 +94,7 @@
   
       public void testOneResource() throws Exception {
           Transaction tx;
  -        MockResource res1 = rm1.getResource();
  +        MockResource res1 = rm1.getResource("rm1");
           tm.begin();
           tx = tm.getTransaction();
           assertNull(res1.getXid());
  
  
  
  1.3       +5 -5      incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java
  
  Index: XidImporterTest.java
  ===================================================================
  RCS file: /home/cvs/incubator-geronimo/modules/transaction/src/test/org/apache/geronimo/transaction/manager/XidImporterTest.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XidImporterTest.java	6 May 2004 04:00:51 -0000	1.2
  +++ XidImporterTest.java	8 Jun 2004 20:14:39 -0000	1.3
  @@ -34,11 +34,11 @@
   public class XidImporterTest extends TestCase{
   
       MockResourceManager rm1 = new MockResourceManager(true);
  -    MockResource r1_1 = new MockResource(rm1);
  -    MockResource r1_2 = new MockResource(rm1);
  +    MockResource r1_1 = new MockResource(rm1, "rm1");
  +    MockResource r1_2 = new MockResource(rm1, "rm1");
       MockResourceManager rm2 = new MockResourceManager(true);
  -    MockResource r2_1 = new MockResource(rm2);
  -    MockResource r2_2 = new MockResource(rm2);
  +    MockResource r2_1 = new MockResource(rm2, "rm2");
  +    MockResource r2_2 = new MockResource(rm2, "rm2");
   
       XidImporter tm = new TransactionManagerImpl();
       XidFactory xidFactory = new XidFactoryImpl();
  
  
  

Mime
View raw message