Author: nzamosenchuk
Date: 2010-02-04 11:17:34 -0500 (Thu, 04 Feb 2010)
New Revision: 1684
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockJDBCConnection.java
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java
Log:
EXOJCR-472: use the same datasource in test as JDBCStorageConnection test uses.
Modified:
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockJDBCConnection.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockJDBCConnection.java 2010-02-04
15:58:26 UTC (rev 1683)
+++
jcr/trunk/exo.jcr.component.core/src/main/java/org/exoplatform/services/jcr/impl/core/lock/jbosscache/LockJDBCConnection.java 2010-02-04
16:17:34 UTC (rev 1684)
@@ -328,7 +328,7 @@
}
/**
- * Closes database connectio
+ * Closes database connection
*
* @throws IllegalStateException
* @throws RepositoryException
Modified:
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java
===================================================================
---
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java 2010-02-04
15:58:26 UTC (rev 1683)
+++
jcr/trunk/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/core/lock/TestLockPerstistentDataManager.java 2010-02-04
16:17:34 UTC (rev 1684)
@@ -37,7 +37,7 @@
{
public void testAddLockData() throws RepositoryException
{
- LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcr", "ws");
+ LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcrtest", "ws");
LockJDBCConnection connection = null;
try
{
@@ -67,7 +67,7 @@
public void testRemoveLockData() throws RepositoryException
{
- LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcr", "ws");
+ LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcrtest", "ws");
LockJDBCConnection connection = null;
try
{
@@ -104,7 +104,7 @@
public void testRefreshLockData() throws RepositoryException
{
- LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcr", "ws");
+ LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcrtest", "ws");
LockJDBCConnection connection = null;
try
{
@@ -149,8 +149,8 @@
public void testgetLockedNodes() throws RepositoryException
{
- LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcr", "test_workspace");
- LockPersistentDataManager dataManagerAnotherWS = new
LockPersistentDataManager("jdbcjcr", "another_workspace");
+ LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcrtest", "test_workspace");
+ LockPersistentDataManager dataManagerAnotherWS = new
LockPersistentDataManager("jdbcjcrtest", "another_workspace");
LockJDBCConnection connection = null;
try
{
@@ -163,7 +163,7 @@
connection.addLockData(new LockData("identifier4-listTest",
"hash4", false, false, "owner", 100));
// commit also closes connection
connection.commit();
-
+
// Adding lock data to another workspace
connection = dataManagerAnotherWS.openConnection(false);
// this lock data is from another workspace and shouldn't be in result set
@@ -183,10 +183,10 @@
}
}
}
-
+
public void testAddLockDataTwice() throws RepositoryException
{
- LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcr", "ws");
+ LockPersistentDataManager dataManager = new
LockPersistentDataManager("jdbcjcrtest", "ws");
LockJDBCConnection connection = null;
try
{
@@ -202,7 +202,8 @@
connection.addLockData(new LockData("identifier", "hash",
false, false, "owner", 100));
fail("exception expected!");
}
- catch (LockException e) {
+ catch (LockException e)
+ {
// it's ok
}
finally
@@ -213,5 +214,5 @@
}
}
}
-
+
}
Show replies by date