From 5ef97ef5053748690c2c6f9292e50fad50e11a91 Mon Sep 17 00:00:00 2001 From: Steven Vroonland Date: Sat, 9 Nov 2024 14:53:50 +0100 Subject: [PATCH] Fix test --- .../src/main/scala/zio/kafka/consumer/internal/Runloop.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zio-kafka/src/main/scala/zio/kafka/consumer/internal/Runloop.scala b/zio-kafka/src/main/scala/zio/kafka/consumer/internal/Runloop.scala index 2f76cf3b6..54b8486bc 100644 --- a/zio-kafka/src/main/scala/zio/kafka/consumer/internal/Runloop.scala +++ b/zio-kafka/src/main/scala/zio/kafka/consumer/internal/Runloop.scala @@ -484,7 +484,8 @@ private[consumer] final class Runloop private ( pollResult <- consumer.runloopAccess { c => for { - _ <- verifyAssignedStreamsMatchesAssignment(state.assignedStreams, c.assignment().asScala.toSet) + assignment <- ZIO.attempt(c.assignment()) + _ <- verifyAssignedStreamsMatchesAssignment(state.assignedStreams, assignment.asScala.toSet) resumeAndPauseCounts <- resumeAndPausePartitions(c, partitionsToFetch) (toResumeCount, toPauseCount) = resumeAndPauseCounts