Skip to content

Commit

Permalink
task-dep-kafka-done
Browse files Browse the repository at this point in the history
  • Loading branch information
yacekmm committed Dec 6, 2024
1 parent 84e7d73 commit 64b5bcc
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;
import org.testcontainers.shaded.org.awaitility.Awaitility;
import static org.assertj.core.api.Assertions.assertThat;

@Component
@RequiredArgsConstructor
Expand All @@ -36,8 +35,7 @@ public void tearDown() {
}

public Event singleEvent() {
//TODO tests are unstable as kafka listener is not always ready
assertThat(receivedEvents).hasSize(1);
Awaitility.await().until(() -> receivedEvents.size() == 1);
return receivedEvents.getFirst();
}
}

0 comments on commit 64b5bcc

Please sign in to comment.