Skip to content

Commit

Permalink
checkstyle
Browse files Browse the repository at this point in the history
  • Loading branch information
paullatzelsperger committed Jul 17, 2024
1 parent 4623546 commit 4b175a2
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import io.restassured.path.json.JsonPath;
import io.restassured.specification.RequestSpecification;
import jakarta.json.Json;
import jakarta.json.JsonPatch;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.testfixtures.TestUtils;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -46,7 +45,8 @@ public class TransferEndToEndTest {
private static final String PROVIDER_ID = "did:web:provider-identityhub%3A7083:provider";
// public API endpoint of the provider-qna connector, goes through the incress controller
private static final String PROVIDER_PUBLIC_URL = "http://127.0.0.1/provider-qna/public";
private static final Duration TEST_TIMEOUT_DURATION = Duration.ofSeconds(60);
private static final Duration TEST_TIMEOUT_DURATION = Duration.ofSeconds(30);
private static final Duration TEST_POLL_DELAY = Duration.ofSeconds(2);

private static RequestSpecification baseRequest() {
return given()
Expand All @@ -64,6 +64,7 @@ void transferData() {
var offerId = new AtomicReference<String>();
// get catalog, extract offer ID
await().atMost(TEST_TIMEOUT_DURATION)
.pollDelay(TEST_POLL_DELAY)
.untilAsserted(() -> {
var oid = baseRequest()
.body(emptyQueryBody)
Expand Down Expand Up @@ -96,6 +97,7 @@ void transferData() {
//wait until negotiation is FINALIZED
var agreementId = new AtomicReference<String>();
await().atMost(TEST_TIMEOUT_DURATION)
.pollDelay(TEST_POLL_DELAY)
.untilAsserted(() -> {
var jp = baseRequest()
.get(CONSUMER_MANAGEMENT_URL + "/api/management/v3/contractnegotiations/" + negotiationId)
Expand Down Expand Up @@ -126,11 +128,13 @@ void transferData() {
var endpoint = new AtomicReference<String>();
var token = new AtomicReference<String>();
await().atMost(TEST_TIMEOUT_DURATION)
.pollDelay(TEST_POLL_DELAY)
.untilAsserted(() -> {
var jp = baseRequest()
.get(CONSUMER_MANAGEMENT_URL + "/api/management/v3/edrs/%s/dataaddress".formatted(transferProcessId))
.then()
.statusCode(200)
.onFailMessage("Expected to find an EDR with transfer ID %s but did not!".formatted(transferProcessId))
.extract().body().jsonPath();

endpoint.set(jp.getString("endpoint"));
Expand Down

0 comments on commit 4b175a2

Please sign in to comment.