From 851d7d012248683eb11ccaa40bc8a44833120316 Mon Sep 17 00:00:00 2001 From: pangdayuan Date: Wed, 11 Sep 2024 15:46:19 +0800 Subject: [PATCH 1/2] feat: add retry json post with headers method --- arex-schedule-web-api/pom.xml | 4 ++-- .../schedule/client/HttpWepServiceApiClient.java | 12 ++++++++++++ pom.xml | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/arex-schedule-web-api/pom.xml b/arex-schedule-web-api/pom.xml index c22564f1..3097f54f 100644 --- a/arex-schedule-web-api/pom.xml +++ b/arex-schedule-web-api/pom.xml @@ -136,7 +136,7 @@ arex-schedule-parent com.arextest - 1.2.18 + 1.2.19 @@ -338,5 +338,5 @@ - 1.2.18 + 1.2.19 \ No newline at end of file diff --git a/arex-schedule-web-api/src/main/java/com/arextest/schedule/client/HttpWepServiceApiClient.java b/arex-schedule-web-api/src/main/java/com/arextest/schedule/client/HttpWepServiceApiClient.java index c2aa2782..99544cf6 100644 --- a/arex-schedule-web-api/src/main/java/com/arextest/schedule/client/HttpWepServiceApiClient.java +++ b/arex-schedule-web-api/src/main/java/com/arextest/schedule/client/HttpWepServiceApiClient.java @@ -239,6 +239,18 @@ public TResponse retryJsonPost(String url, TRequest reques } } + public TResponse retryJsonPost(String url, TRequest request, + Class responseType, Map headers) { + try { + return retryTemplate.execute(retryCallback -> { + retryCallback.setAttribute(URL, url); + return restTemplate.postForObject(url, wrapJsonContentType(request, headers), responseType); + }); + } catch (Exception e) { + return null; + } + } + public ResponseEntity retryJsonPost(String url, TRequest request, ParameterizedTypeReference responseType) { try { diff --git a/pom.xml b/pom.xml index af24aa84..d71d22cc 100644 --- a/pom.xml +++ b/pom.xml @@ -320,5 +320,5 @@ https://github.com/arextest/arex-replay-schedule https://github.com/arextest/arex-replay-schedule - 1.2.18 + 1.2.19 \ No newline at end of file From 392aef83f4bb8d73fb2f4dab1069af43e210d50d Mon Sep 17 00:00:00 2001 From: pangdayuan Date: Sat, 14 Sep 2024 17:55:58 +0800 Subject: [PATCH 2/2] fix: Fixed the issue that there was no matching relationship between the main entrance --- arex-schedule-web-api/pom.xml | 4 ++-- .../comparer/impl/PrepareCompareSourceRemoteLoader.java | 3 ++- pom.xml | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/arex-schedule-web-api/pom.xml b/arex-schedule-web-api/pom.xml index 3097f54f..781d52f5 100644 --- a/arex-schedule-web-api/pom.xml +++ b/arex-schedule-web-api/pom.xml @@ -136,7 +136,7 @@ arex-schedule-parent com.arextest - 1.2.19 + 1.2.20 @@ -338,5 +338,5 @@ - 1.2.19 + 1.2.20 \ No newline at end of file diff --git a/arex-schedule-web-api/src/main/java/com/arextest/schedule/comparer/impl/PrepareCompareSourceRemoteLoader.java b/arex-schedule-web-api/src/main/java/com/arextest/schedule/comparer/impl/PrepareCompareSourceRemoteLoader.java index d128e8b5..8a5c534b 100644 --- a/arex-schedule-web-api/src/main/java/com/arextest/schedule/comparer/impl/PrepareCompareSourceRemoteLoader.java +++ b/arex-schedule-web-api/src/main/java/com/arextest/schedule/comparer/impl/PrepareCompareSourceRemoteLoader.java @@ -119,7 +119,8 @@ private List processMatchNeeded(QueryReplayResultRespo List decodedListResult = new ArrayList<>(resultHolderList.size()); for (ListResultHolder stringListResultHolder : resultHolderList) { MockCategoryType categoryType = stringListResultHolder.getCategoryType(); - if (categoryType == null || categoryType.isSkipComparison()) { + if (categoryType == null || (categoryType.isSkipComparison() && + MockCategoryType.Q_MESSAGE_CONSUMER != categoryType)) { continue; } diff --git a/pom.xml b/pom.xml index d71d22cc..d07d1341 100644 --- a/pom.xml +++ b/pom.xml @@ -320,5 +320,5 @@ https://github.com/arextest/arex-replay-schedule https://github.com/arextest/arex-replay-schedule - 1.2.19 + 1.2.20 \ No newline at end of file