Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT V5 python conformance test test_shared_subscriptions has wrong callback #66

Open
mbuckton opened this issue Jul 17, 2020 · 0 comments

Comments

@mbuckton
Copy link

In the test test_shared_subscriptions where it adds the second client connection / subscription, the test checks the callback result of aclient and not bclient.

As in line : 1148
self.waitfor(callback.subscribeds, 1, 3)

Should be
self.waitfor(callback2.subscribeds, 1, 3)

What happens is that the test falls through, since the original callback is valid it doesn't wait for the second connection and as a result doesn't clear the callbacks in the next 2 lines resulting in false positives

Complete code block follows

  connack = aclient.connect(host=host, port=port, cleanstart=True)
  self.assertEqual(connack.reasonCode.getName(), "Success")
  self.assertEqual(connack.sessionPresent, False)
  aclient.subscribe([shared_sub_topic, topics[0]], [MQTTV5.SubscribeOptions(2)]*2) 
  self.waitfor(callback.subscribeds, 1, 3)

  connack = bclient.connect(host=host, port=port, cleanstart=True)
  self.assertEqual(connack.reasonCode.getName(), "Success")
  self.assertEqual(connack.sessionPresent, False)
  bclient.subscribe([shared_sub_topic, topics[0]], [MQTTV5.SubscribeOptions(2)]*2) 
  self.waitfor(callback2.subscribeds, 1, 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant