summaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java')
-rw-r--r--src/test/java/dev/dnpm/etl/processor/consent/GicsConsentServiceTest.java12
-rw-r--r--src/test/java/dev/dnpm/etl/processor/consent/GicsGetBroadConsentServiceTest.java10
2 files changed, 11 insertions, 11 deletions
diff --git a/src/test/java/dev/dnpm/etl/processor/consent/GicsConsentServiceTest.java b/src/test/java/dev/dnpm/etl/processor/consent/GicsConsentServiceTest.java
index 90c0734..7e392da 100644
--- a/src/test/java/dev/dnpm/etl/processor/consent/GicsConsentServiceTest.java
+++ b/src/test/java/dev/dnpm/etl/processor/consent/GicsConsentServiceTest.java
@@ -51,8 +51,9 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.ValueSource;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.restclient.test.autoconfigure.RestClientTest;
+import org.springframework.core.retry.RetryPolicy;
+import org.springframework.core.retry.RetryTemplate;
import org.springframework.http.MediaType;
-import org.springframework.retry.support.RetryTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.web.client.MockRestServiceServer;
@@ -88,13 +89,12 @@ class GicsConsentServiceTest {
var restTemplate = new RestTemplate();
+ var retryTemplate = new RetryTemplate(RetryPolicy.builder().maxRetries(0).build());
+
this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate);
this.gicsConsentService =
new GicsConsentService(
- this.gIcsConfigProperties,
- RetryTemplate.builder().maxAttempts(1).build(),
- restTemplate,
- this.appFhirConfig);
+ this.gIcsConfigProperties, retryTemplate, restTemplate, this.appFhirConfig);
}
@Test
@@ -277,7 +277,7 @@ class GicsConsentServiceTest {
() ->
new GicsConsentService(
testConfigProperties,
- RetryTemplate.builder().maxAttempts(1).build(),
+ new RetryTemplate(RetryPolicy.builder().maxRetries(0).build()),
new RestTemplate(),
new AppFhirConfig()));
diff --git a/src/test/java/dev/dnpm/etl/processor/consent/GicsGetBroadConsentServiceTest.java b/src/test/java/dev/dnpm/etl/processor/consent/GicsGetBroadConsentServiceTest.java
index e97a8d4..01d05b8 100644
--- a/src/test/java/dev/dnpm/etl/processor/consent/GicsGetBroadConsentServiceTest.java
+++ b/src/test/java/dev/dnpm/etl/processor/consent/GicsGetBroadConsentServiceTest.java
@@ -42,8 +42,9 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.restclient.test.autoconfigure.RestClientTest;
+import org.springframework.core.retry.RetryPolicy;
+import org.springframework.core.retry.RetryTemplate;
import org.springframework.http.MediaType;
-import org.springframework.retry.support.RetryTemplate;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.web.client.MockRestServiceServer;
@@ -87,13 +88,12 @@ class GicsGetBroadConsentServiceTest {
var restTemplate = new RestTemplate();
+ var retryTemplyte = new RetryTemplate(RetryPolicy.builder().maxRetries(0).build());
+
this.mockRestServiceServer = MockRestServiceServer.createServer(restTemplate);
this.service =
new GicsGetBroadConsentService(
- this.gIcsConfigProperties,
- RetryTemplate.builder().maxAttempts(1).build(),
- restTemplate,
- this.appFhirConfig);
+ this.gIcsConfigProperties, retryTemplyte, restTemplate, this.appFhirConfig);
}
@Test