Skip to content
This repository was archived by the owner on Jun 10, 2024. It is now read-only.

Commit

Permalink
try to debug "FAIL: test_30_full (test_message_queue.TestPikaRabbitMQ)"
Browse files Browse the repository at this point in the history
  • Loading branch information
binux committed Mar 5, 2017
1 parent 21dd402 commit 9e6c347
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/test_message_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,24 @@ def tearDownClass(self):
del self.q2
del self.q3

def test_30_full(self):
self.assertEqual(self.q1.qsize(), 0)
self.assertEqual(self.q2.qsize(), 0)
for i in range(2):
self.q1.put_nowait('TEST_DATA%d' % i)
for i in range(3):
self.q2.put('TEST_DATA%d' % i)

print(self.q1.__dict__)
print(self.q1.qsize())
with self.assertRaises(Queue.Full):
self.q1.put_nowait('TEST_DATA6')
print(self.q1.__dict__)
print(self.q1.qsize())
with self.assertRaises(Queue.Full):
self.q1.put('TEST_DATA6', timeout=0.01)


@unittest.skipIf(os.environ.get('IGNORE_RABBITMQ') or os.environ.get('IGNORE_ALL'), 'no rabbitmq server for test.')
class TestAmqpRabbitMQ(TestMessageQueue, unittest.TestCase):

Expand Down

0 comments on commit 9e6c347

Please sign in to comment.