Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(555)

Side by Side Diff: third_party/gsutil/boto/tests/sqs/test_connection.py

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ 1 # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
2 # Copyright (c) 2010, Eucalyptus Systems, Inc. 2 # Copyright (c) 2010, Eucalyptus Systems, Inc.
3 # All rights reserved. 3 # All rights reserved.
4 # 4 #
5 # Permission is hereby granted, free of charge, to any person obtaining a 5 # Permission is hereby granted, free of charge, to any person obtaining a
6 # copy of this software and associated documentation files (the 6 # copy of this software and associated documentation files (the
7 # "Software"), to deal in the Software without restriction, including 7 # "Software"), to deal in the Software without restriction, including
8 # without limitation the rights to use, copy, modify, merge, publish, dis- 8 # without limitation the rights to use, copy, modify, merge, publish, dis-
9 # tribute, sublicense, and/or sell copies of the Software, and to permit 9 # tribute, sublicense, and/or sell copies of the Software, and to permit
10 # persons to whom the Software is furnished to do so, subject to the fol- 10 # persons to whom the Software is furnished to do so, subject to the fol-
(...skipping 25 matching lines...) Expand all
36 def test_1_basic(self): 36 def test_1_basic(self):
37 print '--- running SQSConnection tests ---' 37 print '--- running SQSConnection tests ---'
38 c = SQSConnection() 38 c = SQSConnection()
39 rs = c.get_all_queues() 39 rs = c.get_all_queues()
40 num_queues = 0 40 num_queues = 0
41 for q in rs: 41 for q in rs:
42 num_queues += 1 42 num_queues += 1
43 43
44 # try illegal name 44 # try illegal name
45 try: 45 try:
46 queue = c.create_queue('bad_queue_name') 46 queue = c.create_queue('bad*queue*name')
47 self.fail('queue name should have been bad')
47 except SQSError: 48 except SQSError:
48 pass 49 pass
49 50
50 # now create one that should work and should be unique (i.e. a new one) 51 # now create one that should work and should be unique (i.e. a new one)
51 queue_name = 'test%d' % int(time.time()) 52 queue_name = 'test%d' % int(time.time())
52 timeout = 60 53 timeout = 60
53 queue = c.create_queue(queue_name, timeout) 54 queue = c.create_queue(queue_name, timeout)
54 time.sleep(60) 55 time.sleep(60)
55 rs = c.get_all_queues() 56 rs = c.get_all_queues()
56 i = 0 57 i = 0
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 time.sleep(30) 127 time.sleep(30)
127 128
128 m = queue.read() 129 m = queue.read()
129 assert m['foo'] == 'bar' 130 assert m['foo'] == 'bar'
130 131
131 # now delete that queue and messages 132 # now delete that queue and messages
132 c.delete_queue(queue, True) 133 c.delete_queue(queue, True)
133 134
134 print '--- tests completed ---' 135 print '--- tests completed ---'
135 136
OLDNEW
« no previous file with comments | « third_party/gsutil/boto/tests/sqs/__init__.py ('k') | third_party/gsutil/boto/tests/sts/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698