Skip to content

Commit

Permalink
Fix test with circe.
Browse files Browse the repository at this point in the history
It relied too much on the exact error message
  • Loading branch information
judu committed Feb 7, 2024
1 parent aacac7f commit 03f22e9
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ class CirceProducerConsumerTest extends AnyFunSuite with Matchers {
val topic = Topic("persistent://sample/standalone/ns1/test_" + UUID.randomUUID)

val producer = client.producer[String](ProducerConfig(topic))
val messageId = producer.send("""{"foo": "bar"}""")
val messageId = producer.send("""{"not":"Cafe"}""")
producer.close()

val consumer = client.consumer[Cafe](ConsumerConfig(topics = Seq(topic), subscriptionName = Subscription.generate))
consumer.seek(MessageId.earliest)
val msg = consumer.receive
msg.get.valueTry shouldBe Failure(DecodingFailure("Cafe", List()))
msg.get.valueTry.isFailure shouldBe true
consumer.close()

client.close()
Expand Down

0 comments on commit 03f22e9

Please sign in to comment.