mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-7028 fix integration tests
This commit is contained in:
@@ -109,7 +109,11 @@ public class DeleteHoldTest extends BaseRMTestCase implements BeforeDeleteHoldPo
|
|||||||
public NodeRef run() throws Exception
|
public NodeRef run() throws Exception
|
||||||
{
|
{
|
||||||
// create test holds
|
// create test holds
|
||||||
return createAndCheckHold();
|
NodeRef newHold = createAndCheckHold();
|
||||||
|
// add the record folder to hold1
|
||||||
|
holdService.addToHold(newHold, rmFolder);
|
||||||
|
|
||||||
|
return newHold;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
//Splitting transaction to fix onCreateNodePolicy issue where there was a node not found exception
|
//Splitting transaction to fix onCreateNodePolicy issue where there was a node not found exception
|
||||||
@@ -118,9 +122,6 @@ public class DeleteHoldTest extends BaseRMTestCase implements BeforeDeleteHoldPo
|
|||||||
@Override
|
@Override
|
||||||
public Void run() throws Exception
|
public Void run() throws Exception
|
||||||
{
|
{
|
||||||
// add the record folder to hold1
|
|
||||||
holdService.addToHold(hold1, rmFolder);
|
|
||||||
|
|
||||||
// assert that the folder and records are frozen
|
// assert that the folder and records are frozen
|
||||||
assertTrue(freezeService.isFrozen(rmFolder));
|
assertTrue(freezeService.isFrozen(rmFolder));
|
||||||
assertTrue(freezeService.isFrozen(recordOne));
|
assertTrue(freezeService.isFrozen(recordOne));
|
||||||
@@ -162,33 +163,44 @@ public class DeleteHoldTest extends BaseRMTestCase implements BeforeDeleteHoldPo
|
|||||||
//Splitting transaction to fix onCreateNodePolicy issue where there was a node not found exception
|
//Splitting transaction to fix onCreateNodePolicy issue where there was a node not found exception
|
||||||
doTestInTransaction(new Test<Void>()
|
doTestInTransaction(new Test<Void>()
|
||||||
{
|
{
|
||||||
@Override
|
@Override
|
||||||
public Void run() throws Exception
|
public Void run() throws Exception
|
||||||
{
|
{
|
||||||
NodeRef hold1 = holds.get(0);
|
NodeRef hold1 = holds.get(0);
|
||||||
NodeRef hold2 = holds.get(1);
|
NodeRef hold2 = holds.get(1);
|
||||||
|
|
||||||
// add the record folder to hold1
|
// add the record folder to hold1
|
||||||
holdService.addToHold(hold1, rmFolder);
|
holdService.addToHold(hold1, rmFolder);
|
||||||
|
|
||||||
// assert that the folder and records are frozen
|
// assert that the folder and records are frozen
|
||||||
assertTrue(freezeService.isFrozen(rmFolder));
|
assertTrue(freezeService.isFrozen(rmFolder));
|
||||||
assertTrue(freezeService.isFrozen(recordOne));
|
assertTrue(freezeService.isFrozen(recordOne));
|
||||||
assertTrue(freezeService.isFrozen(recordDeclaredOne));
|
assertTrue(freezeService.isFrozen(recordDeclaredOne));
|
||||||
|
|
||||||
// check the contents of the hold
|
// check the contents of the hold
|
||||||
List<NodeRef> frozenNodes = holdService.getHeld(hold1);
|
List<NodeRef> frozenNodes = holdService.getHeld(hold1);
|
||||||
assertNotNull(frozenNodes);
|
assertNotNull(frozenNodes);
|
||||||
assertEquals(1, frozenNodes.size());
|
assertEquals(1, frozenNodes.size());
|
||||||
assertEquals(rmFolder, frozenNodes.get(0));
|
assertEquals(rmFolder, frozenNodes.get(0));
|
||||||
|
|
||||||
holdService.addToHold(hold2, recordOne);
|
holdService.addToHold(hold2, recordOne);
|
||||||
|
|
||||||
// assert that the folder and records are frozen
|
// assert that the folder and records are frozen
|
||||||
assertTrue(freezeService.isFrozen(rmFolder));
|
assertTrue(freezeService.isFrozen(rmFolder));
|
||||||
assertTrue(freezeService.isFrozen(recordOne));
|
assertTrue(freezeService.isFrozen(recordOne));
|
||||||
assertTrue(freezeService.isFrozen(recordDeclaredOne));
|
assertTrue(freezeService.isFrozen(recordDeclaredOne));
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
doTestInTransaction(new Test<Void>()
|
||||||
|
{
|
||||||
|
@Override
|
||||||
|
public Void run() throws Exception
|
||||||
|
{
|
||||||
|
NodeRef hold1 = holds.get(0);
|
||||||
|
NodeRef hold2 = holds.get(1);
|
||||||
// delete the hold
|
// delete the hold
|
||||||
holdService.deleteHold(hold1);
|
holdService.deleteHold(hold1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user