Skip to content

Commit

Permalink
* MDF [UT] add long wait time for fragile UT
Browse files Browse the repository at this point in the history
Signed-off-by: jaylin <jaylin@emqx.io>
  • Loading branch information
JaylinYu committed May 20, 2024
1 parent 1fd4b1f commit 026426b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion nanomq/tests/broker_tls_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,12 @@ main()
NULL };

pid_sub = popen_with_cmd(&outfp, arg, cmd);
nng_msleep(50); // pub should be slightly behind sub
nng_msleep(1000); // pub should be slightly behind sub
// pipe to pub
p_pub = popen(cmd_pub, "r");

// check recv msg
nng_msleep(5000);
assert(read(outfp, buf, buf_size) != -1);
printf("what we got:%s", buf);
assert(strncmp(buf, "message", 7) == 0);
Expand Down
5 changes: 3 additions & 2 deletions nanomq/tests/properties_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,15 @@ main()
NULL };

pid_sub = popen_with_cmd(&outfp, arg, "/bin/mosquitto_sub");
nng_msleep(50); // pub should be slightly behind sub
nng_msleep(1000); // pub should be slightly behind sub

// pipe to pub
p_pub = popen(cmd_pub, "r");

// check recv msg
nng_msleep(5000);
assert(read(outfp, buf, buf_size) != -1);
printf("what we got:%s", buf);
log_warn("what we got:%s", buf);
assert(strncmp(buf, "message", 7) == 0);

kill(pid_sub, SIGKILL);
Expand Down

0 comments on commit 026426b

Please sign in to comment.