diff options
| author | Paul-Christian Volkmer | 2026-11-06 13:27:16 +0100 |
|---|---|---|
| committer | Paul-Christian Volkmer | 2026-11-06 13:27:16 +0100 |
| commit | 7b8e0f61a2be55a79bec457e65674eb1097c3008 (patch) | |
| tree | 77af44b8b22b47fb8222534a4372a1e600a45591 /src/test/java/dev/dnpm | |
| parent | a29ed1021b5429cec31552defc54e190f406975b (diff) | |
feat: replace old Spring Retryreplace-retry
Diffstat (limited to 'src/test/java/dev/dnpm')
| -rw-r--r-- | src/test/java/dev/dnpm/etl/processor/consent/GicsConsentServiceTest.java | 12 | ||||
| -rw-r--r-- | src/test/java/dev/dnpm/etl/processor/consent/GicsGetBroadConsentServiceTest.java | 10 |
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 |
