printf ("info: send/receive took %f seconds\n",
after_pings - before_pings);
/* Expected timeout is 0.75 seconds. */
- TEST_VERIFY (0.75 <= after_pings - before_pings);
+ TEST_VERIFY (0.70 <= after_pings - before_pings);
TEST_VERIFY (after_pings - before_pings < 1.2);
uint32_t xid;
double after = get_ticks ();
if (test_verbose)
printf ("info: 21 garbage packets took %f seconds\n", after - before);
- /* Expected timeout is 0.5 seconds. Add some slack in case process
- scheduling delays processing the query or response, but do not
- accept a retry (which would happen at 1.5 seconds). */
- TEST_VERIFY (0.5 <= after - before);
+ /* Expected timeout is 0.5 seconds. Add some slack for rounding errors and
+ in case process scheduling delays processing the query or response, but
+ do not accept a retry (which would happen at 1.5 seconds). */
+ TEST_VERIFY (0.45 <= after - before);
TEST_VERIFY (after - before < 1.2);
test_call_flush (clnt);
after - before);
/* Expected timeout is 1.5 seconds. Do not accept a second retry
(which would happen at 3 seconds). */
- TEST_VERIFY (1.5 <= after - before);
+ TEST_VERIFY (1.45 <= after - before);
TEST_VERIFY (after - before < 2.9);
test_call_flush (clnt);
if (test_verbose)
printf ("info: 0.75 second timeout took %f seconds\n",
after - before);
- TEST_VERIFY (0.75 <= after - before);
+ TEST_VERIFY (0.70 <= after - before);
TEST_VERIFY (after - before < 1.4);
test_call_flush (clnt);
printf ("info: test_udp_server: 0.75 second timeout took %f seconds"
" (garbage %d)\n",
after - before, with_garbage);
- TEST_VERIFY (0.75 <= after - before);
+ TEST_VERIFY (0.70 <= after - before);
TEST_VERIFY (after - before < 1.4);
test_call_flush (clnt);
printf ("info: test_udp_server: 2.5 second timeout took %f seconds"
" (garbage %d)\n",
after - before, with_garbage);
- TEST_VERIFY (2.5 <= after - before);
+ TEST_VERIFY (2.45 <= after - before);
TEST_VERIFY (after - before < 3.0);
test_call_flush (clnt);
}