mirror of
https://github.com/cesanta/mongoose.git
synced 2025-01-14 09:48:01 +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
|
||||
#line 1 "src/base64.c"
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
|
||||
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_message = mg_str("mg_will_messsage");
|
||||
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');
|
||||
mg_mqtt_sub(c, &topic, 1);
|
||||
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);
|
||||
|
||||
mg_mgr_free(&mgr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user