You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Jiri Daněk (Jira)" <ji...@apache.org> on 2020/08/19 11:28:00 UTC

[jira] [Commented] (PROTON-1546) Executing examples/python/test_examples.py hangs

    [ https://issues.apache.org/jira/browse/PROTON-1546?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17180466#comment-17180466 ] 

Jiri Daněk commented on PROTON-1546:
------------------------------------

# excessively complicated setup: the file permissions could be already set up in git repository, or set by cmake
# tests should have timeouts, to deal with the hangs ({{subprocess.check_call}} has timeout arg since Python 3.3 ;{
# examples have {{#!/usr/bin/env python}}, which may not match the python used for qpid-proton-python (but usually it will, so no problem; it might be good idea to ensure that examples are running in the same python as the test_examples.py is using, {{sys.executable}}, but that is probably excessive)
# need to be able to see stdout/stderr of subprocesses if things are broken (that's already the case, if the subprocess finishes, but not otherwise)
# currently won't run on python 2.6, use the unittest wrapper in Proton, so we have assertIn available
# (essentially, I'd want the infra for this type of tests that dispatch has ;)
# use different queue for each test, add random suffix (pid?), and check that queues have been emptied at the end
# broker must be running on localhost:5672, transaction support is required, meaning the proton broker example is insufficient
# there should be a ctest target to run the examples; maybe could run them in docker, or run a fully fledged broker in docker (as in https://www.testcontainers.org/)

> Executing examples/python/test_examples.py hangs
> ------------------------------------------------
>
>                 Key: PROTON-1546
>                 URL: https://issues.apache.org/jira/browse/PROTON-1546
>             Project: Qpid Proton
>          Issue Type: Bug
>          Components: examples
>    Affects Versions: proton-c-0.17.0
>         Environment: Fedora 26.
>            Reporter: Irina Boverman
>            Assignee: Justin Ross
>            Priority: Major
>
> dnf install python-qpid-proton-docs
> dnf install python2-case python2-tornado
> export PN_SASL_CONFIG_PATH=/usr/share/proton-0.17.0/examples/python
> export PYTHON_PATH=/usr/share/proton-0.17.0/examples/python
> chmod 755 *.py
> chmod 644 test_examples.py
> nosetests -v
> test hangs...
> This is because test expects server_direct.py to accept connections to "localhost", but it does not.
> Gordon Sim suggested (1) add ability to specify address in  server_direct.py and (2) change the test to use "localhost" when invoking server_direct.py.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org