BJ-967: temporary comment Retryable policy (#5)

This commit is contained in:
Anatolii Karlov 2020-07-30 20:48:43 +07:00 committed by GitHub
parent a44e2abee7
commit 9f80396802
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 11 deletions

View File

@ -8,10 +8,7 @@ import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.retry.annotation.Backoff;
import org.springframework.retry.annotation.Retryable;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.web.client.RestClientResponseException;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
@Slf4j @Slf4j
@ -24,13 +21,13 @@ public class ThreeDsServerClient {
@Value("${client.three-ds-server.url}") @Value("${client.three-ds-server.url}")
private String url; private String url;
@Retryable( // @Retryable(
value = { // value = {
RestClientResponseException.class, // RestClientResponseException.class,
MessageTypeException.class // MessageTypeException.class
}, // },
backoff = @Backoff(delayExpression = "#{${client.retry.delay-ms}}"), // backoff = @Backoff(delayExpression = "#{${client.retry.delay-ms}}"),
maxAttemptsExpression = "#{${client.retry.max-attempts}}") // maxAttemptsExpression = "#{${client.retry.max-attempts}}")
public RBKMoneyPreparationResponse preparationFlow(RBKMoneyPreparationRequest request) { public RBKMoneyPreparationResponse preparationFlow(RBKMoneyPreparationRequest request) {
log.info("Request: {}", request); log.info("Request: {}", request);

View File

@ -67,7 +67,7 @@ public class PreparationFlowServiceTest extends AbstractDaoConfig {
assertThat(cardRanges).hasSize(20); assertThat(cardRanges).hasSize(20);
} }
@Test // @Test
public void shouldRetryOnException() throws IOException { public void shouldRetryOnException() throws IOException {
/* Given: /* Given:
- first stub will answer with 500 status code - first stub will answer with 500 status code