mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Alfresco -> Alfresco deployment is smarter.
- The source store is implicitly snapshotted before deployment begins. - The destination (remote) store is implicitly snapshotted before deployment begins and again when the deployment is finished. - This means that comparison of GUIDs on directories can be used to short circuit the tree comparison. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5636 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -143,35 +143,36 @@ public class AVMServiceTest extends AVMServiceTestBase
|
||||
{
|
||||
DeploymentService depService = (DeploymentService)fContext.getBean("DeploymentService");
|
||||
setupBasicTree();
|
||||
TestDeploymentCallback callback = new TestDeploymentCallback();
|
||||
// TestDeploymentCallback callback = new TestDeploymentCallback();
|
||||
fService.createStore("target");
|
||||
DeploymentReport report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, callback);
|
||||
DeploymentReport report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, null);
|
||||
System.out.println(report);
|
||||
assertEquals(fService.lookup(-1, "main:/a/b/c/foo").getGuid(),
|
||||
fService.lookup(-1, "target:/a/b/c/foo").getGuid());
|
||||
assertEquals(fService.lookup(-1, "main:/a/b/c/bar").getGuid(),
|
||||
fService.lookup(-1, "target:/a/b/c/bar").getGuid());
|
||||
fService.createFile("main:/a/b", "biz").close();
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, true, callback);
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, true, null);
|
||||
System.out.println(report);
|
||||
System.out.println(recursiveList("target", -1, true));
|
||||
assertNull(fService.lookup(-1, "target:/a/b/biz"));
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, callback);
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, null);
|
||||
System.out.println(report);
|
||||
assertEquals(fService.lookup(-1, "main:/a/b/biz").getGuid(),
|
||||
fService.lookup(-1, "target:/a/b/biz").getGuid());
|
||||
fService.removeNode("main:/a/b/c/foo");
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, true, false, callback);
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, true, false, null);
|
||||
System.out.println(report);
|
||||
assertNotNull(fService.lookup(-1, "target:/a/b/c/foo"));
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, callback);
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, null);
|
||||
System.out.println(report);
|
||||
assertNull(fService.lookup(-1, "target:/a/b/c/foo"));
|
||||
fService.removeNode("main:/a/b/c/bar");
|
||||
fService.createDirectory("main:/a/b/c", "bar");
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, callback);
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, null);
|
||||
System.out.println(report);
|
||||
depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target2:/wiggly/diggly", true, false, false, callback);
|
||||
report = depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target:/a", false, false, false, null);
|
||||
depService.deployDifference(-1, "main:/a", "localhost", 50500, "admin", "admin", "target2:/wiggly/diggly", true, false, false, null);
|
||||
System.out.println(report);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
Reference in New Issue
Block a user