[exo-jcr-commits] exo-jcr SVN: r605 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache.
do-not-reply at jboss.org
do-not-reply at jboss.org
Thu Nov 12 10:31:59 EST 2009
Author: areshetnyak
Date: 2009-11-12 10:31:59 -0500 (Thu, 12 Nov 2009)
New Revision: 605
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java
Log:
EXOJCR-201 : The JDBCCacheLoader was changed.
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java 2009-11-12 15:11:56 UTC (rev 604)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JDBCCacheLoaderTest.java 2009-11-12 15:31:59 UTC (rev 605)
@@ -45,6 +45,7 @@
import org.exoplatform.services.jcr.datamodel.NodeData;
import org.exoplatform.services.jcr.datamodel.PropertyData;
import org.exoplatform.services.jcr.datamodel.QPath;
+import org.exoplatform.services.jcr.datamodel.QPathEntry;
import org.exoplatform.services.jcr.datamodel.ValueData;
import org.exoplatform.services.jcr.impl.Constants;
import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
@@ -436,7 +437,7 @@
loader.put(modifications);
- // tests
+ // tests it
NodeData srcNodeData = (NodeData) list.get(0);
WorkspaceStorageConnection conn = persistentContainer.openConnection();
@@ -495,9 +496,28 @@
{
// prepare
-
+ WorkspaceStorageConnection conn = persistentContainer.openConnection();
+
+ String nodeId = IdGenerator.generate();
+ addDbNode(conn, QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]node")), nodeId, Constants.NT_UNSTRUCTURED, null);
+ conn.commit();
+
+ conn = persistentContainer.openConnection();
+ PropertyData propData = addDbProperty(conn, QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]node")), nodeId, InternalQName.parse("[]prop1"), "_Tesed_VALUE", false);
+ conn.commit();
+
+ List<Modification> modifications = new ArrayList<Modification>();
+
+ modifications.addAll(removeProperty(propData));
+
+ loader.put(modifications);
+
// tests it
-
+ conn = persistentContainer.openConnection();
+
+ PropertyData removedPropertyData = (PropertyData) conn.getItemData(propData.getIdentifier());
+
+ assertNull(removedPropertyData);
}
public void testUpdateNode() throws Exception
@@ -537,7 +557,7 @@
addDbNode(conn, QPath.makeChildPath(Constants.ROOT_PATH, InternalQName.parse("[]node")), nodeId, Constants.NT_UNSTRUCTURED, null);
conn.commit();
- // tests
+ // tests it
conn = persistentContainer.openConnection();
NodeData srcNodeData = (NodeData) conn.getItemData(nodeId);
More information about the exo-jcr-commits
mailing list