You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2016/04/22 15:15:37 UTC
qpid-dispatch git commit: DISPATCH-289 - Fixed test problems running
under Solaris (patch from Adel Boutros).
Repository: qpid-dispatch
Updated Branches:
refs/heads/master 8aa2ea2b1 -> 8f4f17474
DISPATCH-289 - Fixed test problems running under Solaris (patch from Adel Boutros).
Project: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/commit/8f4f1747
Tree: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/tree/8f4f1747
Diff: http://git-wip-us.apache.org/repos/asf/qpid-dispatch/diff/8f4f1747
Branch: refs/heads/master
Commit: 8f4f174748ad1d8ef62734aa58bbcccc674728f5
Parents: 8aa2ea2
Author: Ted Ross <tr...@redhat.com>
Authored: Fri Apr 22 09:14:16 2016 -0400
Committer: Ted Ross <tr...@redhat.com>
Committed: Fri Apr 22 09:14:16 2016 -0400
----------------------------------------------------------------------
tests/server_test.c | 18 ++++++++----------
tests/system_test.py | 6 +++---
2 files changed, 11 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/8f4f1747/tests/server_test.c
----------------------------------------------------------------------
diff --git a/tests/server_test.c b/tests/server_test.c
old mode 100644
new mode 100755
index 8621623..621f039
--- a/tests/server_test.c
+++ b/tests/server_test.c
@@ -53,18 +53,16 @@ static void ufd_handler(void *context, qd_user_fd_t *ufd)
if (dir == 0) { // READ
in_read++;
assert(in_read == 1);
- if (!qd_user_fd_is_readable(ufd_read)) {
- sprintf(stored_error, "Expected Readable");
+ len = read(fd[0], &buffer, 1);
+ if (len < 0) {
+ sprintf(stored_error, "Error while reading");
qd_server_stop(qd);
- } else {
- len = read(fd[0], &buffer, 1);
- if (len == 1) {
- read_count++;
- if (read_count == OCTET_COUNT)
- qd_server_stop(qd);
- }
- qd_user_fd_activate_read(ufd_read);
+ } else if (len == 1) {
+ read_count++;
+ if (read_count == OCTET_COUNT)
+ qd_server_stop(qd);
}
+ qd_user_fd_activate_read(ufd_read);
in_read--;
} else { // WRITE
in_write++;
http://git-wip-us.apache.org/repos/asf/qpid-dispatch/blob/8f4f1747/tests/system_test.py
----------------------------------------------------------------------
diff --git a/tests/system_test.py b/tests/system_test.py
old mode 100644
new mode 100755
index 6f5716d..3061e3e
--- a/tests/system_test.py
+++ b/tests/system_test.py
@@ -52,7 +52,7 @@ export PYTHONPATH="$PYTHONPATH:/usr/local/lib/proton/bindings/python:/usr/local/
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib64"
"""
-import os, time, socket, random, subprocess, shutil, unittest, __main__, re
+import errno, os, time, socket, random, subprocess, shutil, unittest, __main__, re
from copy import copy
import proton
from proton import Message
@@ -178,7 +178,7 @@ def port_available(port, protocol_family='IPv4'):
s.connect((host, port))
s.close()
except socket.error, e:
- return e.errno == 111
+ return e.errno == errno.ECONNREFUSED
except:
pass
return False
@@ -188,7 +188,7 @@ def wait_port(port, protocol_family='IPv4', **retry_kwargs):
Takes same keyword arguments as retry to control the timeout"""
def check(e):
"""Only retry on connection refused"""
- if not isinstance(e, socket.error) or not e.errno == 111:
+ if not isinstance(e, socket.error) or not e.errno == errno.ECONNREFUSED:
raise
s, host = get_local_host_socket(protocol_family)
try:
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org