Merged BRANCHES/V3.4 to HEAD:

23857: Add in UserTransactions to a few places that now need it, to fix webscript unit test
   23859: Add in UserTransactions to a few places that now need it, to fix webscript unit test


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23862 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-11-22 16:07:50 +00:00
parent 15a9a0404f
commit 90da842035
2 changed files with 12 additions and 0 deletions

View File

@@ -216,7 +216,10 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
// Remove one, check it goes // Remove one, check it goes
UserTransaction txn = transactionService.getUserTransaction();
txn.begin();
actionTrackingService.recordActionComplete(rd); actionTrackingService.recordActionComplete(rd);
txn.commit();
has1 = false; has1 = false;
has2 = false; has2 = false;
has3 = false; has3 = false;
@@ -509,7 +512,10 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
// Remove one, check it goes // Remove one, check it goes
UserTransaction txn = transactionService.getUserTransaction();
txn.begin();
actionTrackingService.recordActionComplete(rd); actionTrackingService.recordActionComplete(rd);
txn.commit();
has1 = false; has1 = false;
has2 = false; has2 = false;
has3 = false; has3 = false;

View File

@@ -259,10 +259,13 @@ public class ReplicationRestApiTest extends BaseWebScriptTest
// Set start times and statuses on these other two // Set start times and statuses on these other two
UserTransaction txn = transactionService.getUserTransaction();
txn.begin();
rd = replicationService.loadReplicationDefinition("Test2"); rd = replicationService.loadReplicationDefinition("Test2");
actionTrackingService.recordActionExecuting(rd); actionTrackingService.recordActionExecuting(rd);
actionTrackingService.recordActionComplete(rd); actionTrackingService.recordActionComplete(rd);
String startedAt2 = ISO8601DateFormat.format(rd.getExecutionStartDate()); String startedAt2 = ISO8601DateFormat.format(rd.getExecutionStartDate());
txn.commit();
// Try the different sorts // Try the different sorts
@@ -790,7 +793,10 @@ public class ReplicationRestApiTest extends BaseWebScriptTest
// These show up again when no longer running // These show up again when no longer running
txn = transactionService.getUserTransaction();
txn.begin();
actionTrackingService.recordActionComplete(rd); actionTrackingService.recordActionComplete(rd);
txn.commit();
response = sendRequest(new GetRequest(URL_DEFINITION + "Test3"), 200); response = sendRequest(new GetRequest(URL_DEFINITION + "Test3"), 200);
assertEquals(Status.STATUS_OK, response.getStatus()); assertEquals(Status.STATUS_OK, response.getStatus());