Commit 3c459bc15cb8245d38fad34b2fa3a2d4ff9eadc3

Authored by Stéphane Raimbault
1 parent 5b28fb81

Wait before flushing in unit tests

Showing 1 changed file with 2 additions and 0 deletions
tests/unit-test-client.c
@@ -600,6 +600,8 @@ int main(int argc, char *argv[]) @@ -600,6 +600,8 @@ int main(int argc, char *argv[])
600 /* Restore original timeout */ 600 /* Restore original timeout */
601 modbus_set_timeout_begin(ctx, &timeout_begin_old); 601 modbus_set_timeout_begin(ctx, &timeout_begin_old);
602 602
  603 + /* Wait for data before flushing */
  604 + usleep(100);
603 modbus_flush(ctx); 605 modbus_flush(ctx);
604 606
605 /** BAD RESPONSE **/ 607 /** BAD RESPONSE **/