Merge lp:~free.ekanayaka/txamqp/travis-integration into lp:txamqp

Proposed by Free Ekanayaka
Status: Merged
Merged at revision: 75
Proposed branch: lp:~free.ekanayaka/txamqp/travis-integration
Merge into: lp:txamqp
Diff against target: 114 lines (+29/-16)
4 files modified
.travis.yml (+8/-0)
doc/README (+16/-13)
requirements.txt (+1/-0)
src/txamqp/test/test_basic.py (+4/-3)
To merge this branch: bzr merge lp:~free.ekanayaka/txamqp/travis-integration
Reviewer Review Type Date Requested Status
txAMQP Team Pending
Review via email: mp+296788@code.launchpad.net

Description of the change

This branch adds a .travis.yml file with basic configuration for making txamqp tests running on Travis.

An example build is available here:

https://travis-ci.org/freeekanayaka/txamqp

It already caught a small flakiness in a test (apparently basic_qos should be sent before publishing messages, although I couldn't reproduce that failure locally).

I also added a README.md file which symlinks to the (now markdown-ified) doc/README. If there's no need to keep those files under doc/, I could just move them to the top-level dir. The CI badge snippet for now points at my Travis account, but I noticed that GitHub already has a "txamqp" organization, so it'd be nice if we could add an official GitHub mirror of lp:txlongpoll at https://github.com/txamqp/txamqp.

Note that Launchpad only supports syncing a branch *from* GitHub, but not *to*. However it's easy to do that via webhooks. I already have a service that could handle the job, so if you wish it'd be just be a matter of adding that special URL in Launchpad and granting my ssh key write access to GitHub.

You can see how the rendered README looks like here:

https://github.com/freeekanayaka/txamqp

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.travis.yml'
--- .travis.yml 1970-01-01 00:00:00 +0000
+++ .travis.yml 2016-06-08 13:24:16 +0000
@@ -0,0 +1,8 @@
1sudo: false
2dist: trusty
3language: python
4python:
5 - 2.7
6services: rabbitmq
7install: pip install -r requirements.txt
8script: cd src; TXAMQP_BROKER=RABBITMQ trial txamqp
09
=== added symlink 'README.md'
=== target is u'doc/README'
=== modified file 'doc/README'
--- doc/README 2009-08-15 10:27:56 +0000
+++ doc/README 2016-06-08 13:24:16 +0000
@@ -1,51 +1,54 @@
1## Python library for communicating with AMQP peers and brokers using Twisted
2[![Build Status](https://travis-ci.org/freeekanayaka/txamqp.svg?branch=master)](https://travis-ci.org/freeekanayaka/txamqp)
3
1This is a quick post on getting started using the txAMQP library with RabbitMQ,4This is a quick post on getting started using the txAMQP library with RabbitMQ,
2based on Dan Reverri's article "Getting started with RabbitMQ, Python, Twisted,5based on Dan Reverri's article "Getting started with RabbitMQ, Python, Twisted,
3and txAMQP on Ubuntu 9.04" [http://www.apparatusproject.org/blog/?p=38]6and txAMQP on Ubuntu 9.04" [http://www.apparatusproject.org/blog/?p=38]
47
5Install RabbitMQ8### Install RabbitMQ
6 9
7If you're using Debian (or a derivative, like Ubuntu) and RabbitMQ is not10If you're using Debian (or a derivative, like Ubuntu) and RabbitMQ is not
8included in your distribution, you can add RabbitMQ's APT repository:11included in your distribution, you can add RabbitMQ's APT repository:
912
10http://www.rabbitmq.com/debian.html#apt13 http://www.rabbitmq.com/debian.html#apt
1114
12Running RabbitMQ15### Running RabbitMQ
1316
14If you installed RabbitMQ using the Debian package, it will be automatically17If you installed RabbitMQ using the Debian package, it will be automatically
15started. If not, you'll find an init.d file in /etc/init.d/rabbitmq-server18started. If not, you'll find an init.d file in /etc/init.d/rabbitmq-server
1619
17Install Twisted20### Install Twisted
1821
19As of 2009-07-09, txAMQP is being developed using Twisted 8.2.0, it may22As of 2009-07-09, txAMQP is being developed using Twisted 8.2.0, it may
20work with older versions, but it's not guaranteed. In case you are using23work with older versions, but it's not guaranteed. In case you are using
21Ubuntu, and the version available is not recent enough, you can install24Ubuntu, and the version available is not recent enough, you can install
22Twisted through its PPA:25Twisted through its PPA:
2326
24https://launchpad.net/~twisted-dev/+archive/ppa27 https://launchpad.net/~twisted-dev/+archive/ppa
2528
26Install txAMQP29### Install txAMQP
2730
28The instructions below install txAQMP from trunk. There are Ubuntu packages31The instructions below install txAQMP from trunk. There are Ubuntu packages
29available if you prefer, refer to the following page for more details:32available if you prefer, refer to the following page for more details:
3033
31https://launchpad.net/~txamqpteam/+archive/ppa34 https://launchpad.net/~txamqpteam/+archive/ppa
3235
33a. Install Bazaar36a. Install Bazaar
3437
35$ sudo apt-get install bzr38 $ sudo apt-get install bzr
3639
37b. Fetch txAQMP40b. Fetch txAQMP
3841
39$ cd ~42 $ cd ~
40$ bzr branch lp:txamqp txamqp43 $ bzr branch lp:txamqp txamqp
4144
42If you get the error "bzr: ERROR: Unknown repository format: 'Bazaar45If you get the error "bzr: ERROR: Unknown repository format: 'Bazaar
43RepositoryFormatKnitPack6 (bzr 1.9)", you'll need to upgrade Bazaar. You may46RepositoryFormatKnitPack6 (bzr 1.9)", you'll need to upgrade Bazaar. You may
44do so following the instructions at:47do so following the instructions at:
4548
46http://bazaar-vcs.org/Download49 http://bazaar-vcs.org/Download
4750
48c. Install txAMQP51c. Install txAMQP
4952
50$ cd txamqp53 $ cd txamqp
51$ sudo python setup.py install54 $ sudo python setup.py install
5255
=== added file 'requirements.txt'
--- requirements.txt 1970-01-01 00:00:00 +0000
+++ requirements.txt 2016-06-08 13:24:16 +0000
@@ -0,0 +1,1 @@
1-e .
02
=== modified file 'src/txamqp/test/test_basic.py'
--- src/txamqp/test/test_basic.py 2012-07-11 11:12:55 +0000
+++ src/txamqp/test/test_basic.py 2016-06-08 13:24:16 +0000
@@ -264,13 +264,14 @@
264 """264 """
265 #setup: declare queue and subscribe265 #setup: declare queue and subscribe
266 channel = self.channel266 channel = self.channel
267
268 #set prefetch to 5:
269 yield channel.basic_qos(prefetch_count=5)
270
267 yield channel.queue_declare(queue="test-prefetch-count", exclusive=True)271 yield channel.queue_declare(queue="test-prefetch-count", exclusive=True)
268 subscription = yield channel.basic_consume(queue="test-prefetch-count", no_ack=False)272 subscription = yield channel.basic_consume(queue="test-prefetch-count", no_ack=False)
269 queue = yield self.client.queue(subscription.consumer_tag)273 queue = yield self.client.queue(subscription.consumer_tag)
270274
271 #set prefetch to 5:
272 yield channel.basic_qos(prefetch_count=5)
273
274 #publish 10 messages:275 #publish 10 messages:
275 for i in range(1, 11):276 for i in range(1, 11):
276 channel.basic_publish(routing_key="test-prefetch-count", content=Content("Message %d" % i))277 channel.basic_publish(routing_key="test-prefetch-count", content=Content("Message %d" % i))

Subscribers

People subscribed via source and target branches

to status/vote changes: