Skip to content

Commit d2b2f90

Browse files
authored
fix: make consumer use the consumer process id to handle a provider offer (#4528)
* Fixes use of incorrect process id * Update dependencies
1 parent 9f33db9 commit d2b2f90

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

DEPENDENCIES

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ maven/mavencentral/com.jcraft/jzlib/1.1.3, BSD-2-Clause, approved, CQ6218
8282
maven/mavencentral/com.lmax/disruptor/3.4.4, Apache-2.0, approved, clearlydefined
8383
maven/mavencentral/com.networknt/json-schema-validator/1.0.76, Apache-2.0, approved, CQ22638
8484
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.28, Apache-2.0, approved, clearlydefined
85-
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.41.2, , restricted, clearlydefined
85+
maven/mavencentral/com.nimbusds/nimbus-jose-jwt/9.41.2, Apache-2.0, approved, clearlydefined
8686
maven/mavencentral/com.puppycrawl.tools/checkstyle/10.18.2, LGPL-2.1-or-later AND (Apache-2.0 AND LGPL-2.1-or-later) AND Apache-2.0, approved, #16060
8787
maven/mavencentral/com.samskivert/jmustache/1.15, BSD-2-Clause AND BSD-3-Clause, approved, clearlydefined
8888
maven/mavencentral/com.squareup.okhttp3/okhttp-dnsoverhttps/4.12.0, Apache-2.0, approved, #11159

core/control-plane/control-plane-aggregate-services/src/main/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImpl.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ public ServiceResult<ContractNegotiation> notifyOffered(ContractOfferMessage mes
115115
.compose(agent -> {
116116
ServiceResult<ContractNegotiation> result = message.getConsumerPid() == null
117117
? createNegotiation(message, agent.getIdentity(), CONSUMER, message.getCallbackAddress())
118-
: getAndLeaseNegotiation(message.getProviderPid())
118+
: getAndLeaseNegotiation(message.getConsumerPid())
119119
.compose(negotiation -> validateRequest(agent, negotiation).map(it -> negotiation));
120120

121121
return result.onSuccess(negotiation -> {

core/control-plane/control-plane-aggregate-services/src/test/java/org/eclipse/edc/connector/controlplane/services/contractnegotiation/ContractNegotiationProtocolServiceImplTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ void shouldTransitionToOffered_whenNegotiationAlreadyExist() {
688688
var updatedNegotiation = result.getContent();
689689
assertThat(updatedNegotiation.getContractOffers()).hasSize(2);
690690
assertThat(updatedNegotiation.getLastContractOffer()).isEqualTo(contractOffer);
691-
verify(store).findByIdAndLease("providerPid");
691+
verify(store).findByIdAndLease("consumerPid");
692692
verify(listener).offered(any());
693693
verify(transactionContext, atLeastOnce()).execute(any(TransactionContext.ResultTransactionBlock.class));
694694
}

0 commit comments

Comments
 (0)