mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Turned WebScripts registry into an asynchronously-refreshed component
- The size of the object and the nature in which it is read means that it does not really fit into the clustered cache model. We just notify the cluster if the cache entry it needs to be reloaded, serving stale data for a short while - ALF-19982: BM-0013: Reindex: WebScripts registry is repeatedly reset (DeclarativeRegistry) - ALF-19983 BM-0013: Reindex: Solr reindex works very slowly git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@55415 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -86,24 +86,25 @@ public class RepositoryContainerTest extends BaseWebScriptTest
|
||||
/**
|
||||
* Person should be current user irrespective of runas user.
|
||||
*/
|
||||
public void testRunAsAdmin() throws Exception {
|
||||
authenticationComponent.setCurrentUser(USER_ONE);
|
||||
|
||||
// No runas specified within our webscript descriptor
|
||||
Response response = sendRequest(new GetRequest("/test/runas"), STATUS_OK);
|
||||
assertEquals(USER_ONE, response.getContentAsString());
|
||||
public void testRunAsAdmin() throws Exception
|
||||
{
|
||||
authenticationComponent.setCurrentUser(USER_ONE);
|
||||
|
||||
// No runas specified within our webscript descriptor
|
||||
Response response = sendRequest(new GetRequest("/test/runas"), STATUS_OK);
|
||||
assertEquals(USER_ONE, response.getContentAsString());
|
||||
|
||||
authenticationComponent.setCurrentUser(USER_TWO);
|
||||
|
||||
// runas "Admin" specified within our webscript descriptor
|
||||
response = sendRequest(new GetRequest("/test/runasadmin"), STATUS_OK);
|
||||
assertEquals(USER_TWO, response.getContentAsString());
|
||||
|
||||
authenticationComponent.setSystemUserAsCurrentUser();
|
||||
}
|
||||
authenticationComponent.setCurrentUser(USER_TWO);
|
||||
|
||||
// runas "Admin" specified within our webscript descriptor
|
||||
response = sendRequest(new GetRequest("/test/runasadmin"), STATUS_OK);
|
||||
assertEquals(USER_TWO, response.getContentAsString());
|
||||
|
||||
authenticationComponent.setSystemUserAsCurrentUser();
|
||||
}
|
||||
|
||||
|
||||
public void testReset() throws Exception
|
||||
public void testReset() throws Exception
|
||||
{
|
||||
RepositoryContainer repoContainer = (RepositoryContainer) getServer().getApplicationContext().getBean("webscripts.container");
|
||||
repoContainer.reset();
|
||||
|
Reference in New Issue
Block a user