Skip to content

Commit

Permalink
feat: add retryFor again
Browse files Browse the repository at this point in the history
  • Loading branch information
MiguelAHM committed Dec 31, 2024
1 parent 1b8f71e commit c47baf6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@
import jakarta.ws.rs.ProcessingException;
import jakarta.ws.rs.core.MediaType;
import net.ripe.db.whois.api.SecureRestTest;
import net.ripe.db.whois.common.aspects.RetryFor;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;

import java.io.IOException;

import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;
import static org.junit.jupiter.api.Assertions.assertThrows;
Expand All @@ -14,6 +17,7 @@
public class ClientCertificateServiceTestIntegration extends AbstractClientCertificateIntegrationTest {

@Test
@RetryFor(value = IOException.class, attempts = 10, intervalMs = 10000)
public void client_certificate() {
final String response = getClientCertificateWithCertificate();
assertThat(response, containsString("Found 1 certificate(s)."));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import net.ripe.db.whois.api.rest.mapper.FormattedClientAttributeMapper;
import net.ripe.db.whois.api.rest.mapper.FormattedServerAttributeMapper;
import net.ripe.db.whois.api.rest.mapper.WhoisObjectMapper;
import net.ripe.db.whois.common.aspects.RetryFor;
import net.ripe.db.whois.common.domain.CIString;
import net.ripe.db.whois.common.rpsl.AttributeType;
import net.ripe.db.whois.common.rpsl.ObjectType;
Expand All @@ -28,6 +29,7 @@
import org.springframework.beans.factory.annotation.Autowired;

import javax.net.ssl.SSLContext;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;

Expand Down Expand Up @@ -204,6 +206,7 @@ public void update_person_with_client_cert_and_mntner_cert_successful() {
}

@Test
@RetryFor(value = IOException.class, attempts = 10, intervalMs = 10000)
public void update_person_missing_private_key_unauthorised() throws Exception {
// create certificate and don't use private key
final CertificatePrivateKeyPair certificatePrivateKeyPair = new CertificatePrivateKeyPair();
Expand Down

0 comments on commit c47baf6

Please sign in to comment.