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:
eknizat
2019-02-04 10:02:26 +00:00
committed by GitHub
parent 4ce947ab05
commit 28e4df5a1a

View File

@@ -164,8 +164,7 @@ public class RepositoryStartStopTest extends TestCase
* a context twice without error, using it
* when running.
*/
// test ignored from 24 Oct 2018
public void ignoredTestOpenCloseOpenCloseFull() throws Exception
public void testOpenCloseOpenCloseFull() throws Exception
{
assertNoCachedApplicationContext();
@@ -187,8 +186,30 @@ public class RepositoryStartStopTest extends TestCase
ctx = getFullContext();
assertEquals(ctx, ctx2);
// And finally close it
ApplicationContextHelper.closeApplicationContext();
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();