From 086f02b4b7e49f133566385196eeae48212f64c9 Mon Sep 17 00:00:00 2001 From: ndr_brt Date: Mon, 13 Nov 2023 09:20:36 +0100 Subject: [PATCH] build: fix flaky test --- .../edc/dataplane/kafka/pipeline/KafkaDataSource.java | 7 ++++--- .../test/e2e/participant/EndToEndTransferParticipant.java | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/extensions/data-plane/data-plane-kafka/src/main/java/org/eclipse/edc/dataplane/kafka/pipeline/KafkaDataSource.java b/extensions/data-plane/data-plane-kafka/src/main/java/org/eclipse/edc/dataplane/kafka/pipeline/KafkaDataSource.java index 96557316f79..63f249abdea 100644 --- a/extensions/data-plane/data-plane-kafka/src/main/java/org/eclipse/edc/dataplane/kafka/pipeline/KafkaDataSource.java +++ b/extensions/data-plane/data-plane-kafka/src/main/java/org/eclipse/edc/dataplane/kafka/pipeline/KafkaDataSource.java @@ -176,10 +176,11 @@ public boolean hasNext() { @Override public ConsumerRecords next() { - var records = consumer.poll(Duration.ZERO); - while (active.get() && records.isEmpty()) { + ConsumerRecords records; + do { records = consumer.poll(pollDuration); - } + } while (active.get() && records.isEmpty()); + return records; } diff --git a/system-tests/e2e-transfer-test/runner/src/test/java/org/eclipse/edc/test/e2e/participant/EndToEndTransferParticipant.java b/system-tests/e2e-transfer-test/runner/src/test/java/org/eclipse/edc/test/e2e/participant/EndToEndTransferParticipant.java index 68784296212..bc542837e04 100644 --- a/system-tests/e2e-transfer-test/runner/src/test/java/org/eclipse/edc/test/e2e/participant/EndToEndTransferParticipant.java +++ b/system-tests/e2e-transfer-test/runner/src/test/java/org/eclipse/edc/test/e2e/participant/EndToEndTransferParticipant.java @@ -239,6 +239,7 @@ public Map dataPlaneConfiguration() { put("edc.keystore", resourceAbsolutePath("certs/cert.pfx")); put("edc.keystore.password", "123456"); put("edc.dataplane.token.validation.endpoint", controlPlaneControl + "/token"); + put("edc.dataplane.http.sink.partition.size", "1"); } }; }