Skip to content

Commit 0a5024b

Browse files
committed
python_SUITE: Add more debug messages
1 parent 5bfb7bc commit 0a5024b

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

deps/rabbitmq_stomp/test/python_SUITE_data/src/base.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,10 @@ def tearDown(self):
126126
if self.conn.is_connected():
127127
try:
128128
self.conn.disconnect()
129-
except:
129+
except Exception as inst:
130+
print(type(inst))
131+
print(inst.args)
132+
print(inst)
130133
pass
131134
elapsed = time.time() - self._started_at
132135
print('{} ({}s)'.format(self.id(), round(elapsed, 2)))

deps/rabbitmq_stomp/test/python_SUITE_data/src/x_queue_name.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
import base
1212
import time
1313
import os
14+
import test_util
1415

1516
class TestUserGeneratedQueueName(base.BaseTest):
1617

@@ -29,6 +30,12 @@ def test_exchange_dest(self):
2930
pika.ConnectionParameters( host='127.0.0.1', port=int(os.environ["AMQP_PORT"])))
3031
channel = connection.channel()
3132

33+
test_util.rabbitmqctl(['list_queues'])
34+
test_util.rabbitmqctl(['list_connections', 'peer_host', 'peer_port',
35+
'protocol'])
36+
test_util.rabbitmqctl(['list_stomp_connections', 'peer_host',
37+
'peer_port', 'protocol'])
38+
3239
# publish a message to the named queue
3340
channel.basic_publish(
3441
exchange='',
@@ -39,7 +46,7 @@ def test_exchange_dest(self):
3946
self.assertTrue(self.listener.wait(30), "initial message not received")
4047
self.assertEqual(1, len(self.listener.messages))
4148

42-
self.conn.disconnect()
49+
# self.conn.disconnect()
4350
connection.close()
4451
while not connection.is_closed:
4552
time.sleep(1)
@@ -59,6 +66,12 @@ def test_topic_dest(self):
5966
pika.ConnectionParameters( host='127.0.0.1', port=int(os.environ["AMQP_PORT"])))
6067
channel = connection.channel()
6168

69+
test_util.rabbitmqctl(['list_queues'])
70+
test_util.rabbitmqctl(['list_connections', 'peer_host', 'peer_port',
71+
'protocol'])
72+
test_util.rabbitmqctl(['list_stomp_connections', 'peer_host',
73+
'peer_port', 'protocol'])
74+
6275
# publish a message to the named queue
6376
channel.basic_publish(
6477
exchange='',
@@ -69,7 +82,7 @@ def test_topic_dest(self):
6982
self.assertTrue(self.listener.wait(30), "initial message not received")
7083
self.assertEqual(1, len(self.listener.messages))
7184

72-
self.conn.disconnect()
85+
# self.conn.disconnect()
7386
connection.close()
7487
while not connection.is_closed:
7588
time.sleep(1)

0 commit comments

Comments
 (0)