Author: tolusha
Date: 2011-09-28 06:27:01 -0400 (Wed, 28 Sep 2011)
New Revision: 4995
Modified:
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/distribution/TestDataDistributionManager.java
Log:
EXOJCR-1498: Migration tool and guideline for migration from 1.12.10-GA to
1.14.0.CR4-CP01, Test added
Modified:
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/distribution/TestDataDistributionManager.java
===================================================================
---
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/distribution/TestDataDistributionManager.java 2011-09-28
10:24:22 UTC (rev 4994)
+++
jcr/trunk/exo.jcr.component.ext/src/test/java/org/exoplatform/services/jcr/ext/distribution/TestDataDistributionManager.java 2011-09-28
10:27:01 UTC (rev 4995)
@@ -624,6 +624,7 @@
public void testMigration() throws Exception
{
Node rootNode = session.getRootNode().addNode("testRoot");
+ rootNode.addNode("a").setProperty("a", "a");
rootNode.addNode("bob").setProperty("bob", "bob");
rootNode.addNode("john.smith").setProperty("john.smith",
"john.smith");
rootNode.addNode("joiv").setProperty("joiv",
"joiv");
@@ -633,6 +634,7 @@
manager.getDataDistributionType(DataDistributionMode.READABLE).migrate(rootNode);
+ assertTrue(rootNode.hasNode("a"));
assertFalse(rootNode.hasNode("bob"));
assertFalse(rootNode.hasNode("john.smith"));
assertFalse(rootNode.hasNode("joiv"));
@@ -645,6 +647,7 @@
assertTrue(rootNode.hasNode("b___/bo___/bon___/bonjov"));
assertTrue(rootNode.hasNode("a___/an___/ana___/anatoliy.bazko"));
+ assertTrue(rootNode.getNode("a").hasProperty("a"));
assertTrue(rootNode.getNode("b___/bo___/bob").hasProperty("bob"));
assertTrue(rootNode.getNode("j___/jo___/joh___/john.smith").hasProperty("john.smith"));
assertTrue(rootNode.getNode("j___/jo___/joi___/joiv").hasProperty("joiv"));
@@ -654,6 +657,7 @@
// shoud not be any changes
manager.getDataDistributionType(DataDistributionMode.READABLE).migrate(rootNode);
+ assertTrue(rootNode.hasNode("a"));
assertFalse(rootNode.hasNode("bob"));
assertFalse(rootNode.hasNode("john.smith"));
assertFalse(rootNode.hasNode("joiv"));
@@ -666,6 +670,7 @@
assertTrue(rootNode.hasNode("b___/bo___/bon___/bonjov"));
assertTrue(rootNode.hasNode("a___/an___/ana___/anatoliy.bazko"));
+ assertTrue(rootNode.getNode("a").hasProperty("a"));
assertTrue(rootNode.getNode("b___/bo___/bob").hasProperty("bob"));
assertTrue(rootNode.getNode("j___/jo___/joh___/john.smith").hasProperty("john.smith"));
assertTrue(rootNode.getNode("j___/jo___/joi___/joiv").hasProperty("joiv"));
Show replies by date