Skip to content

Commit

Permalink
fix: flaky int test
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jul 17, 2024
1 parent c51e59e commit dd5d278
Showing 1 changed file with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,20 @@ void transferData() {
.statusCode(200)
.extract().body().jsonPath().getString("@id");

// fetch EDR for transfer process
await().atMost(TEST_TIMEOUT_DURATION)
.pollDelay(TEST_POLL_DELAY)
.untilAsserted(() -> {
var jp= baseRequest()
.body(emptyQueryBody)
.post(CONSUMER_MANAGEMENT_URL + "/api/management/v3/transferprocesses/request")
.then()
.statusCode(200)
.extract().body().jsonPath();

assertThat(jp.getString("state")).contains("STARTED");
});

// fetch EDR for transfer processs
var endpoint = new AtomicReference<String>();
var token = new AtomicReference<String>();
await().atMost(TEST_TIMEOUT_DURATION)
Expand All @@ -133,6 +146,7 @@ void transferData() {
var jp = baseRequest()
.get(CONSUMER_MANAGEMENT_URL + "/api/management/v3/edrs/%s/dataaddress".formatted(transferProcessId))
.then()
.log().ifValidationFails()
.statusCode(200)
.onFailMessage("Expected to find an EDR with transfer ID %s but did not!".formatted(transferProcessId))
.extract().body().jsonPath();
Expand Down

0 comments on commit dd5d278

Please sign in to comment.