From f4fd77c9edcd11ec666137d502d40892cadaffeb Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Thu, 3 Mar 2016 12:49:35 +0100 Subject: [PATCH] Send PPA test requests into PPA AMQP queues This separates them from Ubuntu and upstream test requests, avoids that any of those can completely starve the other two, and makes queues easier to manage. --- autopkgtest.py | 4 +++- tests/test_autopkgtest.py | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/autopkgtest.py b/autopkgtest.py index 2accf41..8cdf0ad 100644 --- a/autopkgtest.py +++ b/autopkgtest.py @@ -458,8 +458,10 @@ class AutoPackageTest(object): params = {'triggers': [trigger]} if self.britney.options.adt_ppas: params['ppas'] = self.britney.options.adt_ppas + qname = 'debci-ppa-%s-%s' % (self.series, arch) + else: + qname = 'debci-%s-%s' % (self.series, arch) params = json.dumps(params) - qname = 'debci-%s-%s' % (self.series, arch) if self.amqp_channel: self.amqp_channel.basic_publish(amqp.Message(src + '\n' + params), routing_key=qname) diff --git a/tests/test_autopkgtest.py b/tests/test_autopkgtest.py index 2a458f8..dad4853 100755 --- a/tests/test_autopkgtest.py +++ b/tests/test_autopkgtest.py @@ -1731,8 +1731,9 @@ class T(TestBase): }}) for arch in ['i386', 'amd64']: - self.assertTrue('debci-series-%s:lightgreen {"triggers": ["lightgreen/2"], "ppas": ["joe/foo", "awesome-developers/staging"]}' % arch in self.amqp_requests or - 'debci-series-%s:lightgreen {"ppas": ["joe/foo", "awesome-developers/staging"], "triggers": ["lightgreen/2"]}' % arch in self.amqp_requests) + self.assertTrue('debci-ppa-series-%s:lightgreen {"triggers": ["lightgreen/2"], "ppas": ["joe/foo", "awesome-developers/staging"]}' % arch in self.amqp_requests or + 'debci-ppa-series-%s:lightgreen {"ppas": ["joe/foo", "awesome-developers/staging"], "triggers": ["lightgreen/2"]}' % arch in self.amqp_requests, + self.amqp_requests) self.assertEqual(len(self.amqp_requests), 2) # add results to PPA specific swift container