Ensure EhCache is clean on first test execution
package org.apache.wiki.providers;
+import net.sf.ehcache.CacheManager;
import org.apache.wiki.TestEngine;
import org.apache.wiki.api.core.Page;
import org.apache.wiki.cache.CachingManager;
@@ -27,6 +28,7 @@ import org.apache.wiki.util.FileUtil;
import org.awaitility.Awaitility;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.io.File;
@@ -39,6 +41,11 @@ class CachingProviderTest {
TestEngine engine;
+ @BeforeAll
+ static void ensureEhCacheFreshStart() {
+ CacheManager.getInstance().shutdown();
+ }
+
@AfterEach
void tearDown() {
engine.stop();
