Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamw committed Aug 23, 2023
1 parent d0ddc99 commit fb19069
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kafka/src/main/scala/ox/kafka/KafkaConsumerActor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ object KafkaConsumerActor:
finally
if closeWhenComplete then
logger.debug("Closing the Kafka consumer")
consumer.close()
uninterruptible(consumer.close())
}

c
Expand Down
2 changes: 1 addition & 1 deletion kafka/src/main/scala/ox/kafka/KafkaSink.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object KafkaSink:
finally
if closeWhenComplete then
logger.debug("Closing the Kafka producer")
producer.close()
uninterruptible(producer.close())
}

c
Expand Down
5 changes: 1 addition & 4 deletions kafka/src/test/scala/ox/kafka/KafkaTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,7 @@ class KafkaTest extends AnyFlatSpec with Matchers with EmbeddedKafka with Before

// then
given Deserializer[String] = new StringDeserializer()
consumeFirstStringMessageFrom(topic) shouldBe "a"
consumeFirstStringMessageFrom(topic) shouldBe "b"
consumeFirstStringMessageFrom(topic) shouldBe "c"
// TODO consumeNumberMessagesFrom[String](topic, 3, timeout = 30.seconds) shouldBe List("a", "b", "c")
consumeNumberMessagesFrom[String](topic, 3, timeout = 30.seconds) shouldBe List("a", "b", "c")
}

it should "commit offsets of processed messages" in {
Expand Down

0 comments on commit fb19069

Please sign in to comment.