RM-5931 Adding transaction fix for integration test

This commit is contained in:
Ross Gale
2017-12-06 14:28:26 +00:00
parent ce1e6fe7d2
commit 56dc5edfa7

View File

@@ -82,14 +82,21 @@ public class DeleteHoldTest extends BaseRMTestCase
public void testDeleteHoldBehaviourForRecordFolder()
{
NodeRef hold1 = doTestInTransaction(new Test<NodeRef>()
{
@Override
public NodeRef run() throws Exception
{
// create test holds
return createAndCheckHold();
}
});
//Splitting transaction to fix onCreateNodePolicy issue where there was a node not found exception
doTestInTransaction(new Test<Void>()
{
@Override
public Void run() throws Exception
{
// create test holds
NodeRef hold1 = createAndCheckHold();
// add the record folder to hold1
holdService.addToHold(hold1, rmFolder);
@@ -122,13 +129,21 @@ public class DeleteHoldTest extends BaseRMTestCase
public void testDeleteHoldBehaviourForMultipleHolds()
{
List<NodeRef> holds = doTestInTransaction(new Test<List<NodeRef>>()
{
@Override
public List<NodeRef> run() throws Exception
{
// create test holds
return createAndCheckHolds();
}
});
//Splitting transaction to fix onCreateNodePolicy issue where there was a node not found exception
doTestInTransaction(new Test<Void>()
{
@Override
public Void run() throws Exception
{
// create test holds
List<NodeRef> holds = createAndCheckHolds();
NodeRef hold1 = holds.get(0);
NodeRef hold2 = holds.get(1);