mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
ALF-4296 - different replication definition delete webscript http response code
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@21739 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -63,8 +63,8 @@ public class RunningActionDelete extends AbstractActionWebscript
|
||||
// Request the cancel
|
||||
actionTrackingService.requestActionCancellation(action);
|
||||
|
||||
// Report it cancelled
|
||||
status.setCode(Status.STATUS_GONE);
|
||||
// Report it as having been cancelled
|
||||
status.setCode(Status.STATUS_NO_CONTENT);
|
||||
status.setMessage("Action cancellation requested");
|
||||
status.setRedirect(true);
|
||||
return null;
|
||||
|
@@ -746,8 +746,8 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
|
||||
|
||||
// Request it to cancel
|
||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_GONE);
|
||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_NO_CONTENT);
|
||||
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||
|
||||
|
||||
// Check it was cancelled
|
||||
@@ -755,8 +755,8 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
|
||||
|
||||
// Request again - no change
|
||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_GONE);
|
||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_NO_CONTENT);
|
||||
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||
|
||||
assertEquals(true, actionTrackingService.isCancellationRequested(rd));
|
||||
|
||||
@@ -780,8 +780,8 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
||||
|
||||
|
||||
// Ask for it to be cancelled via the webscript
|
||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key2), Status.STATUS_GONE);
|
||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key2), Status.STATUS_NO_CONTENT);
|
||||
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||
|
||||
|
||||
// Should still be in the cache, not running but cancelled
|
||||
|
Reference in New Issue
Block a user