Fix failing unit tests for new msgpack version
This fixes the failing unit tests with the newly msgpack version. Also depends on a requirements patch that bans pecan 1.4.0 that has broken gnocchi and hence ceilometer which uses gnocchi as the default backend. Task: 40652 Depends-on: https://review.opendev.org/746261 Change-Id: Id75b7d4004a50c588a22c7eeb46ad1d79ee7a189
This commit is contained in:
parent
5af99caad7
commit
f3b606889d
@ -69,7 +69,7 @@ class UDPPublisher(publisher.ConfigPublisherBase):
|
||||
"%(host)s:%(port)d", {'msg': msg, 'host': host,
|
||||
'port': port})
|
||||
try:
|
||||
self.socket.sendto(msgpack.dumps(msg),
|
||||
self.socket.sendto(msgpack.dumps(msg, use_bin_type=True),
|
||||
(self.host, self.port))
|
||||
except Exception as e:
|
||||
LOG.warning(_("Unable to send sample over UDP"))
|
||||
|
@ -125,7 +125,7 @@ class TestUDPPublisher(base.BaseTestCase):
|
||||
sent_counters = []
|
||||
|
||||
for data, dest in self.data_sent:
|
||||
counter = msgpack.loads(data, encoding="utf-8")
|
||||
counter = msgpack.loads(data, raw=False)
|
||||
sent_counters.append(counter)
|
||||
|
||||
# Check destination
|
||||
|
Loading…
x
Reference in New Issue
Block a user