mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
REPO-3962: Remove context refresh from testOpenCloseOpenCloseFull (#336)
* REPO-3962: Remove context refresh from testOpenCloseOpenCloseFull * The refreshing of minimal context does not work with Spring version greater than 5.1.0 * We don't need to test refreshing the core application context as that never happens, only the subsystem application contexts are refreshed * REPO-3962: Add test for application context refresh * Test is disabled for now until the bug in Spring is fixed
This commit is contained in:
@@ -164,8 +164,7 @@ public class RepositoryStartStopTest extends TestCase
|
|||||||
* a context twice without error, using it
|
* a context twice without error, using it
|
||||||
* when running.
|
* when running.
|
||||||
*/
|
*/
|
||||||
// test ignored from 24 Oct 2018
|
public void testOpenCloseOpenCloseFull() throws Exception
|
||||||
public void ignoredTestOpenCloseOpenCloseFull() throws Exception
|
|
||||||
{
|
{
|
||||||
assertNoCachedApplicationContext();
|
assertNoCachedApplicationContext();
|
||||||
|
|
||||||
@@ -187,13 +186,35 @@ public class RepositoryStartStopTest extends TestCase
|
|||||||
ctx = getFullContext();
|
ctx = getFullContext();
|
||||||
assertEquals(ctx, ctx2);
|
assertEquals(ctx, ctx2);
|
||||||
|
|
||||||
// Refresh it, shouldn't break anything
|
|
||||||
((AbstractApplicationContext)ctx).refresh();
|
|
||||||
|
|
||||||
// And finally close it
|
// And finally close it
|
||||||
ApplicationContextHelper.closeApplicationContext();
|
ApplicationContextHelper.closeApplicationContext();
|
||||||
assertNoCachedApplicationContext();
|
assertNoCachedApplicationContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* Enable test after this issue is resolved: https://issues.alfresco.com/jira/browse/REPO-4176
|
||||||
|
* @throws Exception
|
||||||
|
*/
|
||||||
|
public void ignoreTestFullContextRefresh() throws Exception
|
||||||
|
{
|
||||||
|
|
||||||
|
assertNoCachedApplicationContext();
|
||||||
|
|
||||||
|
// Open it, and use it
|
||||||
|
ApplicationContext ctx = getFullContext();
|
||||||
|
assertNotNull(ctx);
|
||||||
|
doTestBasicWriteOperations(ctx);
|
||||||
|
|
||||||
|
// Refresh it, shouldn't break anything
|
||||||
|
((AbstractApplicationContext)ctx).refresh();
|
||||||
|
assertNotNull(ctx);
|
||||||
|
doTestBasicWriteOperations(ctx);
|
||||||
|
|
||||||
|
// And finally close it
|
||||||
|
ApplicationContextHelper.closeApplicationContext();
|
||||||
|
assertNoCachedApplicationContext();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tests that we can open a context, use it,
|
* Tests that we can open a context, use it,
|
||||||
|
Reference in New Issue
Block a user