"trial txamqp" fails with errors

Bug #396679 reported by Zooko Wilcox-O'Hearn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
txAMQP
Fix Released
Undecided
Zooko Wilcox-O'Hearn

Bug Description

I just unpacked "python-txamqp-0.2.1.tar.bz2", cd'ed into the resulting "python-txamqp-0.2.1/src/" and ran "trial txamqp", and every test ERRORed:

zooko@zooko-desktop:~/src$ tar xf ../incoming/python-txamqp-0.2.1.tar.bz2
zooko@zooko-desktop:~/src$ cd python-txamqp-0.2.1/src/
zooko@zooko-desktop:~/src/python-txamqp-0.2.1/src$ trial --rterrors txamqp
txamqp.test.test_basic
  BasicTests
    test_ack ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_cancel ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_consume_exclusive ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_consume_no_local ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_consume_queue_errors ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_consume_unique_consumers ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_get ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_qos_prefetch_count ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.
[ERROR]
    test_qos_prefetch_size ... Traceback (most recent call last):
Failure: twisted.internet.error.ConnectionRefusedError: Connection was refused by other side: 111: Connection refused.

I infer that some sort of setup step is required before running the tests, but there is no README or other document instructing me in how to set it up.

Also, of course, it would be ideal if the tests worked without any manual setup step aside from the normal command to launch tests.

Related branches

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Okay, I've investigated and I see that the tests are all designed to work against an AMQP broker. So, let me change my "it would be ideal" above to say "it would be ideal if there were unit tests that tested the txAMQP source code separately from the behavior of any broker, in addition to these system tests which test the behavior of the txAMQP source code against a broker.

But anyway, I'm writing a patch to emit an error message explaining about the need for a broker to run the tests.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Here is a patch to make it so that people who run "trial txamqp" without having a broker configured will get a useful explanation of what's wrong.

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Here is a version of the patch which explains what authentication/authorization pieces the tests require.

Revision history for this message
Esteve Fernandez (esteve) wrote :

You're right that it would be great to have unit tests, along with integration tests. In any case, we're tracking the issue you reported through Launchpad Answers: https://answers.launchpad.net/txamqp/+question/71014

Revision history for this message
Zooko Wilcox-O'Hearn (zooko) wrote :

Will you accept this patch so that when people run "trial txamqp" they get a useful error message explaining what sort of setup the tests require?

Changed in txamqp:
assignee: nobody → Zooko O'Whielacronx (zooko)
Revision history for this message
Esteve Fernandez (esteve) wrote :

Yes, I will accept this patch, as long as it's reviewed by someone else. But, the next time you want to upload a diff, please create a branch, it makes your and our lives easier. We can track and review changes more easily and you can update your patches.

BTW, sorry for the slow response, but I'm having tonsillitis and some fever, so I won't be able to dedicate much time to txAMQP for a couple of days.

Changed in txamqp:
status: New → In Progress
Changed in txamqp:
status: In Progress → Fix Committed
Changed in txamqp:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.