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

test_mqtt_disconnect in mqtt_pubsub fails #22360

Closed
vanti opened this issue Jan 30, 2020 · 0 comments · Fixed by #22372
Closed

test_mqtt_disconnect in mqtt_pubsub fails #22360

vanti opened this issue Jan 30, 2020 · 0 comments · Fixed by #22372
Assignees
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug

Comments

@vanti
Copy link
Collaborator

vanti commented Jan 30, 2020

Describe the bug
The test test_mqtt_disconnect fails with an assertion when run on cc3220sf_launchxl:

*** Booting Zephyr OS build zephyr-v2.1.0-1280-g523ccb7ec350  ***
Running test suite mqtt_test
===================================================================
starting test - test_mqtt_connect
MQTT connect failed -111
[mqtt_evt_handler:150] MQTT_EVT_CONNACK: Connected!
PASS - test_mqtt_connect
===================================================================
starting test - test_mqtt_subscribe
PASS - test_mqtt_subscribe
===================================================================
starting test - test_mqtt_publish_short
[mqtt_evt_handler:221] items: 1 packet id: 11234
PASS - test_mqtt_publish_short
===================================================================
starting test - test_mqtt_publish_long
[mqtt_evt_handler:177] MQTT_EVT_PUBACK packet id: 29227
PASS - test_mqtt_publish_long
===================================================================
starting test - test_mqtt_unsubscribe
[mqtt_evt_handler:234] packet id: 58081
PASS - test_mqtt_unsubscribe
===================================================================
starting test - test_mqtt_disconnect
[mqtt_evt_handler:156] MQTT_EVT_DISCONNECT: disconnected 0

    Assertion failed at ../src/test_mqtt_pubsub.c:460: test_mqtt_disconnect: test_disconnect() == TC_PASS is false

FAIL - test_mqtt_disconnect
===================================================================
Test suite mqtt_test failed.
===================================================================
PROJECT EXECUTION FAILED

To Reproduce
Steps to reproduce the behavior:

  1. cd zephyr/tests/net/lib/mqtt_pubsub
  2. Update src/config.h to use a valid mqtt broker, e.g.
    #define SERVER_ADDR "137.135.83.217"
  3. west build -b cc3220sf_launchxl -p
  4. west flash
  5. Hit reset button
  6. See error

Expected behavior
I'd expect the test to pass.

Impact
Unable to run the test successfully

Environment (please complete the following information):

  • OS: Ubuntu 18.04
  • Toolchain : Zephyr SDK 0.11.0
  • Commit SHA or Version used: 471ffbe
@vanti vanti added the bug The issue is a bug, or the PR is fixing a bug label Jan 30, 2020
rlubos added a commit to rlubos/zephyr that referenced this issue Jan 31, 2020
It's no longer needed to call `mqtt_input` after `mqtt_disconnect`.
Doing this will actually return an error as the MQTT connection is no
longer active after calling `mqtt_disconnect`.

Fixes zephyrproject-rtos#22360

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
jukkar pushed a commit that referenced this issue Jan 31, 2020
It's no longer needed to call `mqtt_input` after `mqtt_disconnect`.
Doing this will actually return an error as the MQTT connection is no
longer active after calling `mqtt_disconnect`.

Fixes #22360

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Networking bug The issue is a bug, or the PR is fixing a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants