diff --git a/zio-kafka-test/src/test/scala/zio/kafka/consumer/ConsumerSpec.scala b/zio-kafka-test/src/test/scala/zio/kafka/consumer/ConsumerSpec.scala index 89dd0a906..a921e6048 100644 --- a/zio-kafka-test/src/test/scala/zio/kafka/consumer/ConsumerSpec.scala +++ b/zio-kafka-test/src/test/scala/zio/kafka/consumer/ConsumerSpec.scala @@ -648,7 +648,7 @@ object ConsumerSpec extends ZIOSpecDefaultSlf4j with KafkaRandom { .tap { record => // Signal consumer 2 can start when a record is seen for every partition. for { - keys <- c1Keys.updateAndGet(_.appended(record.key)) + keys <- c1Keys.updateAndGet(_ ++ record.key) _ <- c1Started.succeed(()).when(keys.map(_.split('-')(1)).toSet.size == partitionCount) } yield () }