[exo-jcr-commits] exo-jcr SVN: r5652 - jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Feb 16 08:49:34 EST 2012
Author: areshetnyak
Date: 2012-02-16 08:49:34 -0500 (Thu, 16 Feb 2012)
New Revision: 5652
Modified:
jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
Log:
EXOJCR-1757 : Probelm with deadlock in test TestJBossCacheWorkspaceStorageCache was fixed.
Modified: jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java
===================================================================
--- jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2012-02-16 11:17:42 UTC (rev 5651)
+++ jcr/branches/1.15.x/exo.jcr.component.core/src/test/java/org/exoplatform/services/jcr/impl/dataflow/persistent/cache/jbosscache/TestJBossCacheWorkspaceStorageCache.java 2012-02-16 13:49:34 UTC (rev 5652)
@@ -122,8 +122,20 @@
PlainChangesLog chlog = new PlainChangesLogImpl();
chlog.add(ItemState.createAddedState(new PersistedNodeData(idNode, Constants.ROOT_PATH, "parent-id", 1, 0,
Constants.NT_UNSTRUCTURED, null, null)));
+
+ if (mode == Mode.READ_FIRST)
+ {
+ try
+ {
+ goSignal.await();
+ }
+ catch (InterruptedException e)
+ {
+ Thread.currentThread().interrupt();
+ }
+ }
+
cwdm.save(chlog);
- if (mode == Mode.WRITE_FIRST) goSignal.countDown();
}
catch (Exception e)
{
@@ -131,6 +143,7 @@
}
finally
{
+ if (mode == Mode.WRITE_FIRST) goSignal.countDown();
doneSignal.countDown();
}
}
@@ -144,7 +157,6 @@
{
startSignal.await();
cwdm.getItemData(idNode);
- if (mode == Mode.READ_FIRST) goSignal.countDown();
}
catch (Exception e)
{
@@ -152,6 +164,7 @@
}
finally
{
+ if (mode == Mode.READ_FIRST) goSignal.countDown();
doneSignal.countDown();
}
}
@@ -196,17 +209,6 @@
public void commit() throws IllegalStateException, RepositoryException
{
- if (mode == Mode.READ_FIRST)
- {
- try
- {
- goSignal.await();
- }
- catch (InterruptedException e)
- {
- Thread.currentThread().interrupt();
- }
- }
}
public void delete(NodeData data) throws RepositoryException, UnsupportedOperationException,
More information about the exo-jcr-commits
mailing list