From 03f22e98549f720d5965a193d22f9396b9bfb0a5 Mon Sep 17 00:00:00 2001 From: Julien Durillon Date: Wed, 7 Feb 2024 18:02:18 +0100 Subject: [PATCH] Fix test with circe. It relied too much on the exact error message --- .../sksamuel/pulsar4s/circe/CirceProducerConsumerTest.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pulsar4s-circe/src/test/scala-3/com/sksamuel/pulsar4s/circe/CirceProducerConsumerTest.scala b/pulsar4s-circe/src/test/scala-3/com/sksamuel/pulsar4s/circe/CirceProducerConsumerTest.scala index fc98084..f95155f 100644 --- a/pulsar4s-circe/src/test/scala-3/com/sksamuel/pulsar4s/circe/CirceProducerConsumerTest.scala +++ b/pulsar4s-circe/src/test/scala-3/com/sksamuel/pulsar4s/circe/CirceProducerConsumerTest.scala @@ -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()