Skip to content

Commit

Permalink
Merge pull request #392 from catenax-ng/fix/esr-exclude-not-found-fro…
Browse files Browse the repository at this point in the history
…m-supply-on-retry

fix(esr):[-] Exclude NotFound Exception from supplyOn retry
  • Loading branch information
ds-jhartmann authored Oct 13, 2022
2 parents b55150c + 635806b commit 433aaa4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class EsrAcceptanceTest {
@Test
void shouldRetrieveEsrCertificateStatisticsWithExpectedStates() {
// given
final String globalAssetId = "urn:uuid:2ab59090-5406-444a-87c1-3d0b6bc85718";
final String globalAssetId = "urn:uuid:993b2dd2-be30-4455-835d-1cd26bd1635c";
final RequestSpecBuilder builder = new RequestSpecBuilder();
builder.setBaseUri("https://irs-esr.dev.demo.catena-x.net");
final RequestSpecification requestSpecification = builder.build();
Expand All @@ -45,10 +45,10 @@ void shouldRetrieveEsrCertificateStatisticsWithExpectedStates() {
assertThat(actualStatistics.getCertificateName()).isNotNull();
assertThat(actualStatistics.getCertificateName()).isEqualTo(CertificateType.ISO14001);
assertThat(actualStateStatistics).isNotNull();
assertThat(actualStateStatistics.getCertificatesWithStateValid()).isEqualTo(21);
assertThat(actualStateStatistics.getCertificatesWithStateValid()).isEqualTo(5);
assertThat(actualStateStatistics.getCertificatesWithStateInvalid()).isEqualTo(3);
assertThat(actualStateStatistics.getCertificatesWithStateUnknown()).isEqualTo(2);
assertThat(actualStateStatistics.getCertificatesWithStateExceptional()).isEqualTo(1);
assertThat(actualStateStatistics.getCertificatesWithStateExceptional()).isEqualTo(31);
}

}
2 changes: 2 additions & 0 deletions irs-api/src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ resilience4j:
exponentialBackoffMultiplier: 2
supplyOn:
baseConfig: default
ignore-exceptions:
- org.springframework.web.client.HttpClientErrorException.NotFound

aasWrapper:
host: "${AASWRAPPER_HOST:}"
Expand Down

0 comments on commit 433aaa4

Please sign in to comment.