mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
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:
@@ -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;
|
||||||
|
@@ -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());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user