From 74c125fe66c7942aaaff89e26a7da2f032fc7203 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Felix=20D=C3=B6rre?= Date: Tue, 3 May 2016 16:57:44 +0200 Subject: [PATCH] fix: allow testing with rate limits --- tests/org/cacert/gigi/util/TestNotary.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/org/cacert/gigi/util/TestNotary.java b/tests/org/cacert/gigi/util/TestNotary.java index 6fd69d7c..d9f190e0 100644 --- a/tests/org/cacert/gigi/util/TestNotary.java +++ b/tests/org/cacert/gigi/util/TestNotary.java @@ -2,6 +2,7 @@ package org.cacert.gigi.util; import static org.junit.Assert.*; +import java.io.IOException; import java.sql.SQLException; import java.util.Date; @@ -15,8 +16,15 @@ import org.junit.Test; public class TestNotary extends ManagedTest { + // These tests create a lot of users and therefore require resetting of the + // registering-rate-limit. @Test public void testNormalAssurance() throws SQLException, GigiApiException { + try { + clearCaches(); + } catch (IOException e) { + throw new Error(e); + } User[] users = new User[30]; for (int i = 0; i < users.length; i++) { int id = createVerifiedUser("fn" + i, "ln" + i, createUniqueName() + "@email.org", TEST_PASSWORD); @@ -58,6 +66,11 @@ public class TestNotary extends ManagedTest { @Test public void testPoJam() throws SQLException, GigiApiException { + try { + clearCaches(); + } catch (IOException e) { + throw new Error(e); + } User[] users = new User[30]; for (int i = 0; i < users.length; i++) { int id = createVerifiedUser("fn" + i, "ln" + i, createUniqueName() + "@email.org", TEST_PASSWORD); -- 2.39.2