diff options
author | Yann Ylavic <ylavic@apache.org> | 2022-06-26 12:21:33 +0000 |
---|---|---|
committer | Yann Ylavic <ylavic@apache.org> | 2022-06-26 12:21:33 +0000 |
commit | e78d576c68eb2ffd517a9508ae2db4aa02f78a0f (patch) | |
tree | 0e89c834a27783426663f8983ec033b95d2dc4fd /test | |
parent | 51c205578e2a10d1f28417179ac3ec2a3994ecfb (diff) | |
download | apr-e78d576c68eb2ffd517a9508ae2db4aa02f78a0f.tar.gz |
poll: Follow up to r1902236: Fix poll() sleeps cases.
Don't convert timeout to milliseconds before potentially callig apr_sleep().
Tests for "poll() didn't sleep" now use the real timeout as lower limit.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902258 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/testpoll.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/testpoll.c b/test/testpoll.c index 9f90af2dd..fe3520137 100644 --- a/test/testpoll.c +++ b/test/testpoll.c @@ -878,7 +878,7 @@ static void justsleep(abts_case *tc, void *data) ABTS_INT_EQUAL(tc, 0, nsds); ABTS_ASSERT(tc, "apr_poll() didn't sleep", - (t2 - t1) > apr_time_from_msec(100)); + (t2 - t1) >= apr_time_from_msec(200)); for (i = 0; i < sizeof methods / sizeof methods[0]; i++) { rv = apr_pollset_create_ex(&pollset, 5, p, 0, methods[i]); @@ -894,7 +894,7 @@ static void justsleep(abts_case *tc, void *data) ABTS_INT_EQUAL(tc, 0, nsds); ABTS_ASSERT(tc, "apr_pollset_poll() didn't sleep", - (t2 - t1) > apr_time_from_msec(100)); + (t2 - t1) >= apr_time_from_msec(200)); rv = apr_pollset_destroy(pollset); ABTS_INT_EQUAL(tc, APR_SUCCESS, rv); @@ -910,7 +910,7 @@ static void justsleep(abts_case *tc, void *data) ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_TIMEUP(rv)); ABTS_ASSERT(tc, "apr_pollcb_poll() didn't sleep", - (t2 - t1) > apr_time_from_msec(100)); + (t2 - t1) >= apr_time_from_msec(200)); /* no apr_pollcb_destroy() */ } |