Skip to content

Commit

Permalink
build(deps): bump EDC to 0.8.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt committed Aug 12, 2024
1 parent 3385100 commit 592a38f
Show file tree
Hide file tree
Showing 17 changed files with 84 additions and 60 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ format.version = "1.1"
[versions]
assertj = "3.26.3"
awaitility = "4.2.2"
edc = "0.7.1"
edc = "0.8.1"
jakarta-json = "2.0.1"
junit-pioneer = "2.2.0"
jupiter = "5.10.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
package org.eclipse.edc.samples.basic;

import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.EmbeddedRuntime;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimePerClassExtension;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand All @@ -27,11 +29,11 @@
class Basic02healthEndpointTest {

@RegisterExtension
static EdcRuntimeExtension controlPlane = new EdcRuntimeExtension(
":basic:basic-02-health-endpoint",
static RuntimeExtension controlPlane = new RuntimePerClassExtension(new EmbeddedRuntime(
"connector",
emptyMap()
);
emptyMap(),
":basic:basic-02-health-endpoint"
));

@Test
void shouldStartConnector() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
package org.eclipse.edc.samples.basic;

import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.EmbeddedRuntime;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimePerClassExtension;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand All @@ -30,13 +32,13 @@
class Basic03configurationTest {

@RegisterExtension
static EdcRuntimeExtension controlPlane = new EdcRuntimeExtension(
":basic:basic-03-configuration",
static RuntimeExtension controlPlane = new RuntimePerClassExtension(new EmbeddedRuntime(
"connector",
Map.of(
"edc.fs.config", new File(findBuildRoot(), "basic/basic-03-configuration/config.properties").getAbsolutePath()
)
);
),
":basic:basic-03-configuration"
));

@Test
void shouldStartConnector() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

package org.eclipse.edc.samples.common;

import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.EmbeddedRuntime;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimePerClassExtension;

import java.util.Map;

Expand All @@ -38,31 +40,31 @@ public class PrerequisitesCommon {
private static final String PROVIDER_CONFIG_PROPERTIES_FILE_PATH = "transfer/transfer-00-prerequisites/resources/configuration/provider-configuration.properties";
private static final String CONSUMER_CONFIG_PROPERTIES_FILE_PATH = "transfer/transfer-00-prerequisites/resources/configuration/consumer-configuration.properties";

public static EdcRuntimeExtension getProvider() {
public static RuntimeExtension getProvider() {
return getConnector(CONNECTOR_MODULE_PATH, PROVIDER, PROVIDER_CONFIG_PROPERTIES_FILE_PATH);
}

public static EdcRuntimeExtension getConsumer() {
public static RuntimeExtension getConsumer() {
return getConnector(CONNECTOR_MODULE_PATH, CONSUMER, CONSUMER_CONFIG_PROPERTIES_FILE_PATH);
}

public static EdcRuntimeExtension getConsumer(String modulePath) {
public static RuntimeExtension getConsumer(String modulePath) {
return getConnector(modulePath, CONSUMER, CONSUMER_CONFIG_PROPERTIES_FILE_PATH);
}

private static EdcRuntimeExtension getConnector(
private static RuntimeExtension getConnector(
String modulePath,
String moduleName,
String configPropertiesFilePath
) {
return new EdcRuntimeExtension(
modulePath,
return new RuntimePerClassExtension(new EmbeddedRuntime(
moduleName,
Map.of(
EDC_KEYSTORE, getFileFromRelativePath(CERT_PFX_FILE_PATH).getAbsolutePath(),
EDC_KEYSTORE_PASSWORD, KEYSTORE_PASSWORD,
EDC_FS_CONFIG, getFileFromRelativePath(configPropertiesFilePath).getAbsolutePath()
)
);
),
modulePath
));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
package org.eclipse.edc.samples.transfer;

import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;

Expand All @@ -34,10 +34,10 @@
public class Transfer01negotiationTest {

@RegisterExtension
static EdcRuntimeExtension provider = getProvider();
static RuntimeExtension provider = getProvider();

@RegisterExtension
static EdcRuntimeExtension consumer = getConsumer();
static RuntimeExtension consumer = getConsumer();

private static final String NEGOTIATE_CONTRACT_FILE_PATH = "transfer/transfer-01-negotiation/resources/negotiate-contract.json";
private static final String FETCH_DATASET_FROM_CATALOG_FILE_PATH = "transfer/transfer-01-negotiation/resources/get-dataset.json";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import org.apache.http.HttpStatus;
import org.eclipse.edc.connector.controlplane.transfer.spi.types.TransferProcessStates;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.RegisterExtension;
import org.testcontainers.junit.jupiter.Testcontainers;
Expand Down Expand Up @@ -48,10 +48,10 @@ public class Transfer02consumerPullTest {
private static final String START_TRANSFER_FILE_PATH = "transfer/transfer-02-consumer-pull/resources/start-transfer.json";

@RegisterExtension
static EdcRuntimeExtension provider = getProvider();
static RuntimeExtension provider = getProvider();

@RegisterExtension
static EdcRuntimeExtension consumer = getConsumer();
static RuntimeExtension consumer = getConsumer();

@Test
void runSampleSteps() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.eclipse.edc.connector.controlplane.transfer.spi.types.TransferProcessStates;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.samples.util.HttpRequestLoggerConsumer;
import org.eclipse.edc.samples.util.HttpRequestLoggerContainer;
import org.junit.jupiter.api.BeforeAll;
Expand All @@ -42,10 +42,10 @@ public class Transfer03providerPushTest {
private static final String START_TRANSFER_FILE_PATH = "transfer/transfer-03-provider-push/resources/start-transfer.json";

@RegisterExtension
static EdcRuntimeExtension provider = getProvider();
static RuntimeExtension provider = getProvider();

@RegisterExtension
static EdcRuntimeExtension consumer = getConsumer();
static RuntimeExtension consumer = getConsumer();

@Container
public static HttpRequestLoggerContainer httpRequestLoggerContainer = new HttpRequestLoggerContainer(LOG_CONSUMER);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import org.eclipse.edc.connector.controlplane.transfer.spi.types.TransferProcessStates;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.samples.util.HttpRequestLoggerContainer;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Expand All @@ -41,10 +41,10 @@ public class Transfer04eventConsumerTest {
private static final String START_TRANSFER_FILE_PATH = "transfer/transfer-02-consumer-pull/resources/start-transfer.json";

@RegisterExtension
static EdcRuntimeExtension provider = getProvider();
static RuntimeExtension provider = getProvider();

@RegisterExtension
static EdcRuntimeExtension consumer = getConsumer(CONSUMER_WITH_LISTENER_MODULE_PATH);
static RuntimeExtension consumer = getConsumer(CONSUMER_WITH_LISTENER_MODULE_PATH);

@Container
static HttpRequestLoggerContainer httpRequestLoggerContainer = new HttpRequestLoggerContainer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@
import jakarta.json.Json;
import okhttp3.mockwebserver.MockWebServer;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.EmbeddedRuntime;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimePerClassExtension;
import org.eclipse.edc.util.io.Ports;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -62,22 +64,22 @@ public class Streaming01httpToHttpTest {
.build();

@RegisterExtension
static EdcRuntimeExtension providerConnector = new EdcRuntimeExtension(
":transfer:streaming:streaming-01-http-to-http:streaming-01-runtime",
static RuntimeExtension providerConnector = new RuntimePerClassExtension(new EmbeddedRuntime(
"provider",
Map.of(
"edc.fs.config", getFileFromRelativePath(SAMPLE_FOLDER + "/streaming-01-runtime/provider.properties").getAbsolutePath()
)
);
),
":transfer:streaming:streaming-01-http-to-http:streaming-01-runtime"
));

@RegisterExtension
static EdcRuntimeExtension consumerConnector = new EdcRuntimeExtension(
":transfer:streaming:streaming-01-http-to-http:streaming-01-runtime",
"provider",
static RuntimeExtension consumerConnector = new RuntimePerClassExtension(new EmbeddedRuntime(
"consumer",
Map.of(
"edc.fs.config", getFileFromRelativePath(SAMPLE_FOLDER + "/streaming-01-runtime/consumer.properties").getAbsolutePath()
)
);
),
":transfer:streaming:streaming-01-http-to-http:streaming-01-runtime"
));
private final int httpReceiverPort = Ports.getFreePort();
private final MockWebServer consumerReceiverServer = new MockWebServer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@
import org.apache.kafka.clients.producer.ProducerRecord;
import org.apache.kafka.common.serialization.StringSerializer;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.EmbeddedRuntime;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimePerClassExtension;
import org.eclipse.edc.util.io.Ports;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
Expand Down Expand Up @@ -77,26 +79,26 @@ public class Streaming02KafkaToHttpTest {
.withEnv("KAFKA_CREATE_TOPICS", TOPIC.concat(":1:1"));

@RegisterExtension
static EdcRuntimeExtension providerConnector = new EdcRuntimeExtension(
":transfer:streaming:streaming-02-kafka-to-http:streaming-02-runtime",
static RuntimeExtension providerConnector = new RuntimePerClassExtension(new EmbeddedRuntime(
"provider",
Map.of(
"edc.fs.config",
getFileFromRelativePath(SAMPLE_FOLDER + "/streaming-02-runtime/provider.properties")
.getAbsolutePath()
)
);
),
":transfer:streaming:streaming-02-kafka-to-http:streaming-02-runtime"
));

@RegisterExtension
static EdcRuntimeExtension consumerConnector = new EdcRuntimeExtension(
":transfer:streaming:streaming-02-kafka-to-http:streaming-02-runtime",
static RuntimeExtension consumerConnector = new RuntimePerClassExtension(new EmbeddedRuntime(
"consumer",
Map.of(
"edc.fs.config",
getFileFromRelativePath(SAMPLE_FOLDER + "/streaming-02-runtime/consumer.properties")
.getAbsolutePath()
)
);
),
":transfer:streaming:streaming-02-kafka-to-http:streaming-02-runtime"
));
private final int httpReceiverPort = Ports.getFreePort();
private final MockWebServer consumerReceiverServer = new MockWebServer();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
import org.apache.kafka.common.serialization.StringDeserializer;
import org.apache.kafka.common.serialization.StringSerializer;
import org.eclipse.edc.junit.annotations.EndToEndTest;
import org.eclipse.edc.junit.extensions.EdcRuntimeExtension;
import org.eclipse.edc.junit.extensions.EmbeddedRuntime;
import org.eclipse.edc.junit.extensions.RuntimeExtension;
import org.eclipse.edc.junit.extensions.RuntimePerClassExtension;
import org.eclipse.edc.spi.types.domain.edr.EndpointDataReference;
import org.eclipse.edc.util.io.Ports;
import org.jetbrains.annotations.NotNull;
Expand Down Expand Up @@ -105,26 +107,26 @@ public class Streaming03KafkaToKafkaTest {
.withLogConsumer(frame -> System.out.print(frame.getUtf8String()));

@RegisterExtension
static EdcRuntimeExtension providerConnector = new EdcRuntimeExtension(
":transfer:streaming:%s:%s".formatted(SAMPLE_NAME, RUNTIME_NAME),
static RuntimeExtension providerConnector = new RuntimePerClassExtension(new EmbeddedRuntime(
"provider",
Map.of(
"edc.fs.config",
getFileFromRelativePath(RUNTIME_PATH.resolve("provider.properties").toString())
.getAbsolutePath()
)
);
),
":transfer:streaming:%s:%s".formatted(SAMPLE_NAME, RUNTIME_NAME)
));

@RegisterExtension
static EdcRuntimeExtension consumerConnector = new EdcRuntimeExtension(
":transfer:streaming:%s:%s".formatted(SAMPLE_NAME, RUNTIME_NAME),
static RuntimeExtension consumerConnector = new RuntimePerClassExtension(new EmbeddedRuntime(
"consumer",
Map.of(
"edc.fs.config",
getFileFromRelativePath(RUNTIME_PATH.resolve("consumer.properties").toString())
.getAbsolutePath()
)
);
),
":transfer:streaming:%s:%s".formatted(SAMPLE_NAME, RUNTIME_NAME)
));

private final int httpReceiverPort = Ports.getFreePort();
private final MockWebServer edrReceiverServer = new MockWebServer();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ web.http.protocol.path=/protocol
web.http.control.port=28183
web.http.control.path=/control
edc.dsp.callback.address=http://localhost:28182/protocol
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
edc.participant.id=consumer
edc.ids.id=urn:connector:consumer
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ web.http.protocol.path=/protocol
web.http.control.port=18183
web.http.control.path=/control
edc.dsp.callback.address=http://localhost:18182/protocol
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
edc.participant.id=provider
edc.ids.id=urn:connector:provider
edc.dataplane.http.sink.partition.size=1
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ web.http.protocol.path=/protocol
web.http.control.port=28183
web.http.control.path=/control
edc.dsp.callback.address=http://localhost:28182/protocol
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
edc.participant.id=consumer
edc.ids.id=urn:connector:consumer
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ web.http.protocol.path=/protocol
web.http.control.port=18183
web.http.control.path=/control
edc.dsp.callback.address=http://localhost:18182/protocol
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
edc.participant.id=provider
edc.ids.id=urn:connector:provider
edc.dataplane.http.sink.partition.size=1
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ web.http.protocol.path=/protocol
web.http.control.port=28183
web.http.control.path=/control
edc.dsp.callback.address=http://localhost:28182/protocol
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
edc.participant.id=consumer
edc.receiver.http.dynamic.endpoint=http://localhost:4000/receiver
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ web.http.protocol.path=/protocol
web.http.control.port=18183
web.http.control.path=/control
edc.dsp.callback.address=http://localhost:18182/protocol
edc.transfer.proxy.token.signer.privatekey.alias=private-key
edc.transfer.proxy.token.verifier.publickey.alias=public-key
edc.participant.id=provider
edc.ids.id=urn:connector:provider
edc.dataplane.http.sink.partition.size=1
Expand Down

0 comments on commit 592a38f

Please sign in to comment.