94103: Explicitly clear cached SearchService instance between ITs

This commit is contained in:
Yura Bondarenko
2022-08-29 11:55:54 +02:00
parent ab3938b34f
commit 611f610f15
4 changed files with 22 additions and 2 deletions

View File

@@ -18,6 +18,7 @@ import java.util.TimeZone;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.dspace.builder.AbstractBuilder;
import org.dspace.discovery.SearchUtils;
import org.dspace.servicemanager.DSpaceKernelImpl;
import org.dspace.servicemanager.DSpaceKernelInit;
import org.junit.AfterClass;
@@ -104,6 +105,7 @@ public class AbstractDSpaceIntegrationTest {
// Unload DSpace services
AbstractBuilder.destroy();
SearchUtils.clearCachedSearchService();
// NOTE: We explicitly do NOT stop/destroy the kernel, as it is cached
// in the Spring ApplicationContext. By default, to speed up tests,