mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 17:58:11 +08:00
Increate mqtt test timeout
This commit is contained in:
parent
a84acf5b8b
commit
65fd834654
@ -25,6 +25,7 @@ void mg_connect_resolved(struct mg_connection *);
|
|||||||
#ifdef MG_ENABLE_LINES
|
#ifdef MG_ENABLE_LINES
|
||||||
#line 1 "src/base64.c"
|
#line 1 "src/base64.c"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
static int mg_b64idx(int c) {
|
static int mg_b64idx(int c) {
|
||||||
|
@ -340,11 +340,11 @@ static void test_mqtt(void) {
|
|||||||
opts.will_topic = mg_str("mg_will_topic");
|
opts.will_topic = mg_str("mg_will_topic");
|
||||||
opts.will_message = mg_str("mg_will_messsage");
|
opts.will_message = mg_str("mg_will_messsage");
|
||||||
c = mg_mqtt_connect(&mgr, url, &opts, mqtt_cb, buf);
|
c = mg_mqtt_connect(&mgr, url, &opts, mqtt_cb, buf);
|
||||||
for (i = 0; i < 100 && buf[0] == 0; i++) mg_mgr_poll(&mgr, 10);
|
for (i = 0; i < 200 && buf[0] == 0; i++) mg_mgr_poll(&mgr, 10);
|
||||||
ASSERT(buf[0] == 'X');
|
ASSERT(buf[0] == 'X');
|
||||||
mg_mqtt_sub(c, &topic, 1);
|
mg_mqtt_sub(c, &topic, 1);
|
||||||
mg_mqtt_pub(c, &topic, &data, 1, false);
|
mg_mqtt_pub(c, &topic, &data, 1, false);
|
||||||
for (i = 0; i < 100 && buf[1] == 0; i++) mg_mgr_poll(&mgr, 10);
|
for (i = 0; i < 200 && buf[1] == 0; i++) mg_mgr_poll(&mgr, 10);
|
||||||
ASSERT(strcmp(buf, "Xx/f12/hi") == 0);
|
ASSERT(strcmp(buf, "Xx/f12/hi") == 0);
|
||||||
|
|
||||||
mg_mgr_free(&mgr);
|
mg_mgr_free(&mgr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user