diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index eb81835c0..7225c6ffa 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -87,6 +87,8 @@ jobs: mosquitto -c scripts/broker_test/mosquitto.conf &> broker.log & sleep 1 # let the broker set everything up mosquitto_sub -t sensors &> sub.log & + env: + WOLFMQTT_NO_EXTERNAL_BROKER_TESTS: 1 # This is some debug info useful if something goes wrong - name: Show network status diff --git a/zephyr/samples/client.c b/zephyr/samples/client.c index c85f1fde3..2225f66c7 100644 --- a/zephyr/samples/client.c +++ b/zephyr/samples/client.c @@ -31,7 +31,14 @@ int main(void) mqtt_init_ctx(&mqttCtx); mqttCtx.test_mode = 1; - +#ifdef WOLFMQTT_NO_EXTERNAL_BROKER_TESTS + /* Set port as configured in scripts/broker_test/mosquitto.conf */ +#if WOLFMQTT_DEFAULT_TLS + mqttCtx.port = 18883; +#else + mqttCtx.port = 11883; +#endif +#endif rc = mqttclient_test(&mqttCtx); mqtt_free_ctx(&mqttCtx);