jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1348035 - in /jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm: repository/RepositoryUtilTest.java transaction/jackrabbit/UserTransactionImpl.java
Date Fri, 08 Jun 2012 12:17:35 GMT
Author: ard
Date: Fri Jun  8 12:17:35 2012
New Revision: 1348035

URL: http://svn.apache.org/viewvc?rev=1348035&view=rev
Log:
OCM-56 remove UserTransactionImpl test class because it relies on deprecated XASession and
does not seem related at all to OCM project

Removed:
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/transaction/jackrabbit/UserTransactionImpl.java
Modified:
    jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java

Modified: jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java?rev=1348035&r1=1348034&r2=1348035&view=diff
==============================================================================
--- jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java
(original)
+++ jackrabbit/commons/ocm/trunk/src/test/java/org/apache/jackrabbit/ocm/repository/RepositoryUtilTest.java
Fri Jun  8 12:17:35 2012
@@ -20,10 +20,8 @@ import javax.jcr.Node;
 import javax.jcr.Repository;
 import javax.jcr.Session;
 import javax.jcr.nodetype.NodeTypeManager;
-import javax.transaction.UserTransaction;
 import junit.framework.TestCase;
 
-import org.apache.jackrabbit.ocm.transaction.jackrabbit.UserTransactionImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -130,52 +128,4 @@ public class RepositoryUtilTest extends 
 
     }
 
-    public void testUserTransaction()
-    {
-    	try
-		{
-			Repository repository = RepositoryUtil.getRepository("repositoryTest");
-			assertNotNull("The repository is null", repository);
-			Session session = RepositoryUtil.login(repository, "superuser",
-					"superuser");
-
-			UserTransaction utx = new UserTransactionImpl(session);
-
-			// start transaction
-			utx.begin();
-
-			// add node and save
-			Node root = session.getRootNode();
-			root.addNode("test");
-			session.save();
-			utx.commit();
-			
-			assertTrue("test node doesn't exist", session.itemExists("/test"));
-			
-			utx = new UserTransactionImpl(session);
-			utx.begin();
-			Node test = (Node) session.getItem("/test");
-			test.remove();
-			session.save();
-			utx.rollback();
-			
-			assertTrue("test node doesn't exist", session.itemExists("/test"));			
-
-			utx = new UserTransactionImpl(session);
-			utx.begin();
-			test = (Node) session.getItem("/test");
-			test.remove();
-			session.save();
-			utx.commit();
-			
-			assertFalse("test node exists", session.itemExists("/test"));			
-			
-		}
-		catch (Exception e)
-		{
-            e.printStackTrace();
-            fail("Unable to run user transaction : " + e);
-		}
-    }
-
 }
\ No newline at end of file



Mime
View raw message