From 4e2865e0ac7d64a9fb8fa99537a0953ca52f5c95 Mon Sep 17 00:00:00 2001 From: "marcin.bobinski" Date: Fri, 10 Jan 2025 09:51:23 +0100 Subject: [PATCH] SKYEDEN-3020 | resolve conflicts --- .../KafkaRetransmissionServiceTest.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/integration-tests/src/integrationTest/java/pl/allegro/tech/hermes/integrationtests/KafkaRetransmissionServiceTest.java b/integration-tests/src/integrationTest/java/pl/allegro/tech/hermes/integrationtests/KafkaRetransmissionServiceTest.java index e17e410b0c..9c6f47cc43 100644 --- a/integration-tests/src/integrationTest/java/pl/allegro/tech/hermes/integrationtests/KafkaRetransmissionServiceTest.java +++ b/integration-tests/src/integrationTest/java/pl/allegro/tech/hermes/integrationtests/KafkaRetransmissionServiceTest.java @@ -90,19 +90,20 @@ public void shouldMoveOffsetNearGivenTimestamp(boolean suspendedSubscription) .retransmit( topic.getQualifiedName(), subscription.getName(), retransmissionDate, false); - if (suspendedSubscription) { - hermes.api().activateSubscription(topic, subscription.getName()); - hermes.api().waitUntilSubscriptionActivated(topic.getQualifiedName(), subscription.getName()); - } - // then - response.expectStatus().isOk(); // Check if Kafka committed offsets were moved on retransmission assertThat( hermes .api() .calculateCommittedMessages(topic.getQualifiedName(), subscription.getName())) .isLessThan(commitedMessages); + response.expectStatus().isOk(); + + if (suspendedSubscription) { + hermes.api().activateSubscription(topic, subscription.getName()); + hermes.api().waitUntilSubscriptionActivated(topic.getQualifiedName(), subscription.getName()); + } + messages2.forEach(subscriber::waitUntilReceived); hermes.api().waitUntilConsumerCommitsOffset(topic.getQualifiedName(), subscription.getName()); assertThat(