This is an automated email from the ASF dual-hosted git repository. chug pushed a commit to branch dev-protocol-adaptors-2 in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git
The following commit(s) were added to refs/heads/dev-protocol-adaptors-2 by this push: new ae262ac DISPATCH-1825: Skip TCP self test if selectors module is absent ae262ac is described below commit ae262acb8c7e800b5870f35246fd31b691d44a05 Author: Chuck Rolke <c...@apache.org> AuthorDate: Tue Nov 3 15:41:29 2020 -0500 DISPATCH-1825: Skip TCP self test if selectors module is absent Create dummy echo client and server modules if import fails due to lack of 'selectors'. Skip tests if import of selectors fails --- tests/system_tests_tcp_adaptor.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/tests/system_tests_tcp_adaptor.py b/tests/system_tests_tcp_adaptor.py index c2b1dd1..40f667b 100644 --- a/tests/system_tests_tcp_adaptor.py +++ b/tests/system_tests_tcp_adaptor.py @@ -32,14 +32,20 @@ from system_test import TestCase, Qdrouterd, main_module, TIMEOUT from system_test import Logger from system_test import QdManager from system_test import unittest -from system_test import Process from system_test import DIR from qpid_dispatch.management.client import Node from subprocess import PIPE, STDOUT -from TCP_echo_client import TcpEchoClient -from TCP_echo_server import TcpEchoServer -class TcpAdaptorOneRouterEcho(TestCase, Process): +try: + from TCP_echo_client import TcpEchoClient + from TCP_echo_server import TcpEchoServer +except ImportError: + class TCP_echo_client(object): + pass + class TCP_echo_server(object): + pass + +class TcpAdaptorOneRouterEcho(TestCase): """ Run echo tests through a stand-alone router """ @@ -150,6 +156,13 @@ class TcpAdaptorOneRouterEcho(TestCase, Process): Run many echo clients. :return: """ + # run test only if selectors module is available + try: + import selectors + except ImportError: + # server and client modules require selectors + self.skipTest("Python selectors module is not available on this platform.") + # define logging print_logs_server = True print_logs_client = True --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org