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
|
// Request the cancel
|
||||||
actionTrackingService.requestActionCancellation(action);
|
actionTrackingService.requestActionCancellation(action);
|
||||||
|
|
||||||
// Report it cancelled
|
// Report it as having been cancelled
|
||||||
status.setCode(Status.STATUS_GONE);
|
status.setCode(Status.STATUS_NO_CONTENT);
|
||||||
status.setMessage("Action cancellation requested");
|
status.setMessage("Action cancellation requested");
|
||||||
status.setRedirect(true);
|
status.setRedirect(true);
|
||||||
return null;
|
return null;
|
||||||
|
@@ -746,8 +746,8 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
|||||||
|
|
||||||
|
|
||||||
// Request it to cancel
|
// Request it to cancel
|
||||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_GONE);
|
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_NO_CONTENT);
|
||||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||||
|
|
||||||
|
|
||||||
// Check it was cancelled
|
// Check it was cancelled
|
||||||
@@ -755,8 +755,8 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
|||||||
|
|
||||||
|
|
||||||
// Request again - no change
|
// Request again - no change
|
||||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_GONE);
|
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key), Status.STATUS_NO_CONTENT);
|
||||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||||
|
|
||||||
assertEquals(true, actionTrackingService.isCancellationRequested(rd));
|
assertEquals(true, actionTrackingService.isCancellationRequested(rd));
|
||||||
|
|
||||||
@@ -780,8 +780,8 @@ public class RunningActionRestApiTest extends BaseWebScriptTest
|
|||||||
|
|
||||||
|
|
||||||
// Ask for it to be cancelled via the webscript
|
// Ask for it to be cancelled via the webscript
|
||||||
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key2), Status.STATUS_GONE);
|
response = sendRequest(new DeleteRequest(URL_RUNNING_ACTION + key2), Status.STATUS_NO_CONTENT);
|
||||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||||
|
|
||||||
|
|
||||||
// Should still be in the cache, not running but cancelled
|
// Should still be in the cache, not running but cancelled
|
||||||
|
@@ -54,8 +54,8 @@ public class ReplicationDefinitionDelete extends AbstractReplicationWebscript
|
|||||||
// Delete it
|
// Delete it
|
||||||
replicationService.deleteReplicationDefinition(replicationDefinition);
|
replicationService.deleteReplicationDefinition(replicationDefinition);
|
||||||
|
|
||||||
// Report it as gone
|
// Report that we have deleted it
|
||||||
status.setCode(Status.STATUS_GONE);
|
status.setCode(Status.STATUS_NO_CONTENT);
|
||||||
status.setMessage("Replication Definition deleted");
|
status.setMessage("Replication Definition deleted");
|
||||||
status.setRedirect(true);
|
status.setRedirect(true);
|
||||||
return null;
|
return null;
|
||||||
|
@@ -1197,8 +1197,8 @@ public class ReplicationRestApiTest extends BaseWebScriptTest
|
|||||||
txn.begin();
|
txn.begin();
|
||||||
|
|
||||||
// Call the delete webscript
|
// Call the delete webscript
|
||||||
response = sendRequest(new DeleteRequest(URL_DEFINITION + "Test"), Status.STATUS_GONE);
|
response = sendRequest(new DeleteRequest(URL_DEFINITION + "Test"), Status.STATUS_NO_CONTENT);
|
||||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||||
|
|
||||||
// Let the node service do its work
|
// Let the node service do its work
|
||||||
txn.commit();
|
txn.commit();
|
||||||
@@ -1229,8 +1229,8 @@ public class ReplicationRestApiTest extends BaseWebScriptTest
|
|||||||
txn = transactionService.getUserTransaction();
|
txn = transactionService.getUserTransaction();
|
||||||
txn.begin();
|
txn.begin();
|
||||||
|
|
||||||
response = sendRequest(new DeleteRequest(URL_DEFINITION + "Test"), Status.STATUS_GONE);
|
response = sendRequest(new DeleteRequest(URL_DEFINITION + "Test"), Status.STATUS_NO_CONTENT);
|
||||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||||
|
|
||||||
txn.commit();
|
txn.commit();
|
||||||
Thread.sleep(50);
|
Thread.sleep(50);
|
||||||
@@ -1244,8 +1244,8 @@ public class ReplicationRestApiTest extends BaseWebScriptTest
|
|||||||
txn = transactionService.getUserTransaction();
|
txn = transactionService.getUserTransaction();
|
||||||
txn.begin();
|
txn.begin();
|
||||||
|
|
||||||
response = sendRequest(new DeleteRequest(URL_DEFINITION + "Test 3"), Status.STATUS_GONE);
|
response = sendRequest(new DeleteRequest(URL_DEFINITION + "Test 3"), Status.STATUS_NO_CONTENT);
|
||||||
assertEquals(Status.STATUS_GONE, response.getStatus());
|
assertEquals(Status.STATUS_NO_CONTENT, response.getStatus());
|
||||||
|
|
||||||
txn.commit();
|
txn.commit();
|
||||||
Thread.sleep(50);
|
Thread.sleep(50);
|
||||||
|
Reference in New Issue
Block a user