]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/testUtils/ManagedTest.java
ADD: Delete affiliations + testcase
[gigi.git] / tests / org / cacert / gigi / testUtils / ManagedTest.java
index dff72da839de5481e4dce2944dbf9dd22364d571..2303ef70a3dcb8b7b96eb61535e2d1f32e9ca186 100644 (file)
@@ -46,9 +46,9 @@ import org.cacert.gigi.pages.account.MyDetails;
 import org.cacert.gigi.pages.main.RegisterPage;
 import org.cacert.gigi.testUtils.TestEmailReciever.TestMail;
 import org.cacert.gigi.util.DatabaseManager;
+import org.cacert.gigi.util.DatabaseManager.ImportType;
 import org.cacert.gigi.util.ServerConstants;
 import org.cacert.gigi.util.SimpleSigner;
-import org.cacert.gigi.util.DatabaseManager.ImportType;
 import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -155,8 +155,12 @@ public class ManagedTest extends ConfiguredTest {
             e.printStackTrace();
         }
         System.out.println(" in " + (System.currentTimeMillis() - ms) + " ms");
-        String type = testProps.getProperty("type");
+        clearCaches();
+    }
+
+    public static void clearCaches() throws IOException {
         ObjectCache.clearAllCaches();
+        String type = testProps.getProperty("type");
         if (type.equals("local")) {
             URL u = new URL("https://" + getServerName() + "/manage");
             u.openConnection().getHeaderField("Location");