Skip to content

Commit

Permalink
fix: end to end transfer process flaky test (#3256)
Browse files Browse the repository at this point in the history
  • Loading branch information
ndr-brt authored Jul 3, 2023
1 parent 999bad8 commit 7eee479
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
import static java.util.Collections.emptySet;
import static org.assertj.core.api.Assertions.assertThat;
import static org.eclipse.edc.connector.transfer.spi.types.TransferProcessStates.COMPLETED;
import static org.eclipse.edc.connector.transfer.spi.types.TransferProcessStates.REQUESTED;
import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.CONTEXT;
import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.ID;
import static org.eclipse.edc.jsonld.spi.JsonLdKeywords.TYPE;
Expand Down Expand Up @@ -140,7 +141,7 @@ void deprovision() {
@Test
void terminate() {
var id = UUID.randomUUID().toString();
getStore().updateOrCreate(createTransferProcess(id));
getStore().updateOrCreate(createTransferProcessBuilder(id).state(REQUESTED.code()).build());
var requestBody = createObjectBuilder()
.add(CONTEXT, createObjectBuilder().add(VOCAB, EDC_NAMESPACE))
.add("reason", "any")
Expand All @@ -151,6 +152,7 @@ void terminate() {
.body(requestBody)
.post("/" + id + "/terminate")
.then()
.log().ifError()
.statusCode(204);
}

Expand Down

0 comments on commit 7eee479

Please sign in to comment.