summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2006-03-13 16:46:18 +0000
committerWilliam A. Rowe Jr <wrowe@apache.org>2006-03-13 16:46:18 +0000
commitfc8da4f2946b8cc27524a83ba0e5083ba23d3d46 (patch)
tree02a9faf7c22967953579c46c24d886531b393851
parentb9f162510a38b77c879825cb7e46a5d3f9785e46 (diff)
downloadapr-fc8da4f2946b8cc27524a83ba0e5083ba23d3d46.tar.gz
There are -so- many reasons this code -could- fail, and any
of them will hang the remainder of the test. Better to simply fail them all, with an extra notice when the error is unusual. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@385594 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/testsock.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/test/testsock.c b/test/testsock.c
index e1b4bfa3d..d5a3e65a5 100644
--- a/test/testsock.c
+++ b/test/testsock.c
@@ -258,16 +258,15 @@ static void test_get_addr(abts_case *tc, void *data)
* succeed (if the connection can be established synchronously),
* but if it does, this test cannot proceed. */
rv = apr_socket_connect(cd, sa);
- if (rv == APR_SUCCESS) {
+ if (!APR_STATUS_IS_EINPROGRESS(rv)) {
apr_socket_close(ld);
apr_socket_close(cd);
+ APR_ASSERT_SUCCESS(tc, "connect to listener", rv);
ABTS_NOT_IMPL(tc, "Cannot test if connect completes "
"synchronously");
return;
}
- ABTS_INT_EQUAL(tc, 1, APR_STATUS_IS_EINPROGRESS(rv));
-
APR_ASSERT_SUCCESS(tc, "accept connection",
apr_socket_accept(&sd, ld, p));