Skip to content

Commit

Permalink
* FIX [trantest] avoid frequently fail test
Browse files Browse the repository at this point in the history
Signed-off-by: Hermann0222 <[email protected]>
  • Loading branch information
StargazerWayne committed Nov 16, 2023
1 parent e52b8be commit 6c07218
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/trantest.h
Original file line number Diff line number Diff line change
Expand Up @@ -689,6 +689,7 @@ trantest_mqtt_sub_pub(trantest *tt)
trantest_mqtt_sub_send(tt->reqsock, client, true);
nng_msleep(1000);// make sure the server recv sub msg before we send pub msg.
cp1 = trantest_mqtt_pub(tt->repsock, true);
nng_msleep(1000);
cp2 = trantest_mqtt_sub_recv(tt->reqsock);
trantest_mqtt_unsub_send(tt->reqsock, client, true);
// syn sub & unsub
Expand Down Expand Up @@ -735,6 +736,7 @@ trantest_mqttv5_sub_pub(trantest *tt)
trantest_mqtt_sub_send(tt->reqsock, client, true);
nng_msleep(1000);// make sure the server recv sub msg before we send pub msg.
cp1 = trantest_mqtt_pub(tt->repsock, true);
nng_msleep(1000);
cp2 = trantest_mqtt_sub_recv(tt->reqsock);
trantest_mqtt_unsub_send(tt->reqsock, client, true);
nng_mqtt_disconnect(&(tt->reqsock), 0, NULL);
Expand Down

0 comments on commit 6c07218

Please sign in to comment.