A tweak to createSnapshot that forces snapshots for stores which

have layered nodes in them.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5587 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Britt Park
2007-05-01 18:09:23 +00:00
parent 656f297ebb
commit 46bdd48e3f
2 changed files with 37 additions and 16 deletions

View File

@@ -83,6 +83,29 @@ import org.alfresco.util.Pair;
*/
public class AVMServiceTest extends AVMServiceTestBase
{
public void testLayerSnapshots()
{
try
{
setupBasicTree();
assertEquals(1, fService.createSnapshot("main", null, null));
fService.createStore("layer");
fService.createLayeredDirectory("main:/a", "layer:/", "a");
fService.createSnapshot("layer", null, null);
fService.createFile("main:/a", "Xander");
fService.createSnapshot("layer", null, null);
assertEquals(2, fService.lookup(2, "layer:/a").getIndirectionVersion());
assertEquals(fService.lookup(2, "main:/a/Xander").getId(),
fService.lookup(2, "layer:/a/Xander").getId());
assertNull(fService.lookup(1, "layer:/a/Xander"));
}
catch (Exception e)
{
e.printStackTrace();
fail();
}
}
public void testBranchLayerSnapshot()
{
try