Skip to content

Commit ca574b0

Browse files
committed
ci: fix tck tests
1 parent 20d46f1 commit ca574b0

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

‎spi/data-plane/data-plane-spi/src/main/java/org/eclipse/edc/connector/dataplane/spi/iam/DataPlaneAuthorizationService.java‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ public interface DataPlaneAuthorizationService {
3737
* <p>
3838
* In addition, this service checks whether the token has permission to access the data identified by the {@code requestData} parameter, which could be a URL,
3939
* or query params, etc.
40-
* <p>
41-
* The result (if successful) of this method is the original {@link DataAddress} that was passed to a previous invocation of
42-
* {@link DataPlaneAuthorizationService#createEndpointDataReference(DataFlow)}, i.e. {@link DataFlowStartMessage#getSourceDataAddress()}.
4340
*
4441
* @param token The raw, encoded token, e.g. serialized JWT
4542
* @param requestData Additional information about the request, such as a URL, query params, headers, etc.

‎system-tests/protocol-tck/tck-extension/src/main/java/org/eclipse/edc/tck/dsp/guard/StatefulEntityTriggerSubscriber.java‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void register(Trigger<SE> trigger) {
5656
public <E extends Event> void on(EventEnvelope<E> envelope) {
5757

5858
try {
59-
TimeUnit.MILLISECONDS.sleep(100);
59+
TimeUnit.MILLISECONDS.sleep(300);
6060
} catch (InterruptedException e) {
6161
throw new RuntimeException(e);
6262
}
@@ -67,9 +67,13 @@ public <E extends Event> void on(EventEnvelope<E> envelope) {
6767
var event = baseEventPayload.cast(envelope.getPayload());
6868
transactionContext.execute(() -> {
6969
var id = idFromEventPayload.apply(event);
70-
var entity = store.findByIdAndLease(id).getContent();
71-
trigger.action().accept(entity);
72-
update(entity);
70+
store.findByIdAndLease(id)
71+
.onSuccess(entity -> {
72+
trigger.action().accept(entity);
73+
update(entity);
74+
}).onFailure(f -> {
75+
monitor.warning("Cannot find entity %s: %s, so trigger doesn't get executed. Event: %s".formatted(id, f.getReason(), event.getClass().getSimpleName()));
76+
});
7377
});
7478
} catch (Exception e) {
7579
monitor.severe("Generic error while trying to execute TCK trigger on event " + envelope.getPayload().name(), e);

0 commit comments

Comments
 (0)