Skip to content

Commit 102c002

Browse files
committed
protobuf test: don't match on exception error string since it might change
1 parent ca16986 commit 102c002

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/integration/schema_registry/test_proto_serializers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#
1717
import pytest
1818

19-
from confluent_kafka import TopicPartition, KafkaException
19+
from confluent_kafka import TopicPartition, KafkaException, KafkaError
2020
from confluent_kafka.error import ConsumeError
2121
from confluent_kafka.schema_registry.protobuf import ProtobufSerializer, ProtobufDeserializer
2222
from .gen import metadata_proto_pb2
@@ -145,6 +145,6 @@ def dr(err, msg):
145145
partition=0)
146146
producer.flush()
147147

148-
with pytest.raises(ConsumeError,
149-
match="Error parsing message"):
148+
with pytest.raises(ConsumeError) as e:
150149
consumer.poll()
150+
assert e.value.code == KafkaError._KEY_DESERIALIZATION

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy