summaryrefslogtreecommitdiff
path: root/funtests
diff options
context:
space:
mode:
authorAsk Solem <askh@opera.com>2011-05-25 14:35:04 +0100
committerAsk Solem <ask@celeryproject.org>2011-05-25 14:36:11 +0100
commita5f54f0745dd200a95516f4f770fff0a89127316 (patch)
tree73fd9c29fea71154b7be51df7ef7443704786072 /funtests
parent54f194b72548083ab051df1886fef619d8f1e101 (diff)
downloadkombu-a5f54f0745dd200a95516f4f770fff0a89127316.tar.gz
SQS transport now replaces dots in queue names with dashes, and all other punctuation with underscores, as SQS only accepts alphanumerics + -,_. Thanks to adamn
Diffstat (limited to 'funtests')
-rw-r--r--funtests/tests/test_SQS.py3
-rw-r--r--funtests/transport.py3
2 files changed, 4 insertions, 2 deletions
diff --git a/funtests/tests/test_SQS.py b/funtests/tests/test_SQS.py
index 1b3633d9..4fc31a0a 100644
--- a/funtests/tests/test_SQS.py
+++ b/funtests/tests/test_SQS.py
@@ -8,9 +8,10 @@ from funtests import transport
class test_SQS(transport.TransportCase):
transport = "SQS"
prefix = "sqs"
- sep = "-" # SQS queue names cannot include '.'
event_loop_max = 100
message_size_limit = 4192 # SQS max body size / 2.
+ suppress_disorder_warning = True # does not guarantee FIFO order,
+ # even in simple cases.
def before_connect(self):
if "AWS_ACCESS_KEY_ID" not in os.environ:
diff --git a/funtests/transport.py b/funtests/transport.py
index 6086751f..ced4cca1 100644
--- a/funtests/transport.py
+++ b/funtests/transport.py
@@ -61,6 +61,7 @@ class TransportCase(unittest.TestCase):
password = None
event_loop_max = 100
connection_options = {}
+ suppress_disorder_warning = False
connected = False
skip_test_reason = None
@@ -152,7 +153,7 @@ class TransportCase(unittest.TestCase):
for msg in consumeN(self.connection, consumer, n)]
self.assertEqual(len(received), n)
ordering = [i for i, _ in received]
- if ordering != range(n):
+ if ordering != range(n) and not self.suppress_disorder_warning:
warnings.warn(
"%s did not deliver messages in FIFO order: %r" % (
self.transport, ordering))