]> WPIA git - gigi.git/blobdiff - tests/org/cacert/gigi/testUtils/ManagedTest.java
Fix: some smaller findBugs issues (static access, syncing, random..)
[gigi.git] / tests / org / cacert / gigi / testUtils / ManagedTest.java
index d9fb31e77fa2168dbc0e82cb642998f61aeff4d5..4ac5d910f3d9ba78f3a2f1f65a33c0ff35b784de 100644 (file)
@@ -169,7 +169,7 @@ public class ManagedTest extends ConfiguredTest {
 
     public static void clearCaches() throws IOException {
         ObjectCache.clearAllCaches();
-        String type = testProps.getProperty("type");
+        // String type = testProps.getProperty("type");
         URL u = new URL("https://" + getServerName() + "/manage");
         u.openConnection().getHeaderField("Location");
     }
@@ -219,15 +219,19 @@ public class ManagedTest extends ConfiguredTest {
 
     @After
     public void clearAcceptLanguage() {
-        acceptLanguage = null;
+        ManagedTest.setAcceptLanguage(null);
     }
 
     public TestMail waitForMail() {
-        try {
-            return ter.recieve();
-        } catch (InterruptedException e) {
-            throw new Error(e);
+        TestMail mail = null;
+        while (null == mail) {
+            try {
+                mail = ter.recieve();
+            } catch (InterruptedException e) {
+                throw new Error(e);
+            }
         }
+        return mail;
     }
 
     public static TestEmailReciever getMailReciever() {