[exo-jcr-commits] exo-jcr SVN: r866 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock.
do-not-reply at jboss.org
do-not-reply at jboss.org
Wed Nov 25 10:24:48 EST 2009
Author: nzamosenchuk
Date: 2009-11-25 10:24:48 -0500 (Wed, 25 Nov 2009)
New Revision: 866
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
Log:
EXOJCR-262: test fully commented
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 15:17:49 UTC (rev 865)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/lock/TestLockCleanupOnRestart.java 2009-11-25 15:24:48 UTC (rev 866)
@@ -37,7 +37,7 @@
/*
* This test should be performed manually because it requires JCR tearDown and startup without
- * cleaning it's content.
+ * cleaning it's content. BEFORE TESTING UNCOMMENT TEST BODY and TEAR DOWN
*
* To check whether lock-properties are deleted as expected, first run:
* >mvn clean test -Dtest=org.exoplatform.services.jcr.api.lock.TestLockCleanupOnRestart
@@ -49,50 +49,50 @@
public void testLockCleanUp() throws Exception
{
- log.info("/!\\ This test should be executed twice ('mvn clean test "
- + "-Dtest=...' and then without 'clean') and separately from other tests /!\\");
- NodeImpl node;
- try
- {
- node = (NodeImpl)root.getNode(testNodeName);
- log.info("Node \"/LockIt\" found, this is correct SECOND run.");
- }
- catch (PathNotFoundException e)
- {
- node = (NodeImpl)root.addNode(testNodeName);
- node.addMixin("mix:lockable");
- log.info("Node \"/LockIt\" not found, this is probably FIRST run. If not, "
- + "ensure that \"clean\" is not invoked in \"maven test\"!");
- }
- session.save();
- // locking the node with open-scoped deep lock.
- // no exception should be thrown
- try
- {
- node.lock(true, false);
- // ok!
- }
- catch (Exception e)
- {
- fail("Unexpected exception" + e.getStackTrace());
- }
+// log.info("/!\\ This test should be executed twice ('mvn clean test "
+// + "-Dtest=...' and then without 'clean') and separately from other tests /!\\");
+// NodeImpl node;
+// try
+// {
+// node = (NodeImpl)root.getNode(testNodeName);
+// log.info("Node \"/LockIt\" found, this is correct SECOND run.");
+// }
+// catch (PathNotFoundException e)
+// {
+// node = (NodeImpl)root.addNode(testNodeName);
+// node.addMixin("mix:lockable");
+// log.info("Node \"/LockIt\" not found, this is probably FIRST run. If not, "
+// + "ensure that \"clean\" is not invoked in \"maven test\"!");
+// }
+// session.save();
+// // locking the node with open-scoped deep lock.
+// // no exception should be thrown
+// try
+// {
+// node.lock(true, false);
+// // ok!
+// }
+// catch (Exception e)
+// {
+// fail("Unexpected exception" + e.getStackTrace());
+// }
}
- @Override
- protected void tearDown() throws Exception
- {
- // super.tearDown in not invoked to prevent DB cleaning
- // shutdown HSSQLDB :)
- for (Object uri : DatabaseManager.getDatabaseURIs())
- {
- try
- {
- Connection c = DriverManager.getConnection("jdbc:hsqldb:" + uri.toString(), "sa", "");
- c.createStatement().execute("SHUTDOWN");
- }
- catch (Throwable e)
- {
- }
- }
- }
+// @Override
+// protected void tearDown() throws Exception
+// {
+// // super.tearDown in not invoked to prevent DB cleaning
+// // shutdown HSSQLDB :)
+// for (Object uri : DatabaseManager.getDatabaseURIs())
+// {
+// try
+// {
+// Connection c = DriverManager.getConnection("jdbc:hsqldb:" + uri.toString(), "sa", "");
+// c.createStatement().execute("SHUTDOWN");
+// }
+// catch (Throwable e)
+// {
+// }
+// }
+// }
}
More information about the exo-jcr-commits
mailing list