mirror of
https://github.com/commaai/msgq.git
synced 2026-06-11 23:44:58 +08:00
data value checking in TestPubSubSockets::test_conflate (#644)
* check each message value in test_messaging * check correctness with conflate False
This commit is contained in:
@@ -52,9 +52,11 @@ class TestPubSubSockets:
|
||||
recvd_msgs = msgq.drain_sock_raw(sub_sock)
|
||||
if conflate:
|
||||
assert len(recvd_msgs) == 1
|
||||
assert recvd_msgs[0] == sent_msgs[-1]
|
||||
else:
|
||||
# TODO: compare actual data
|
||||
assert len(recvd_msgs) == len(sent_msgs)
|
||||
for rec_msg, sent_msg in zip(recvd_msgs, sent_msgs):
|
||||
assert rec_msg == sent_msg
|
||||
|
||||
def test_receive_timeout(self):
|
||||
sock = random_sock()
|
||||
|
||||
Reference in New Issue
Block a user