11
11
import base
12
12
import time
13
13
import os
14
+ import test_util
14
15
15
16
class TestUserGeneratedQueueName (base .BaseTest ):
16
17
@@ -29,6 +30,12 @@ def test_exchange_dest(self):
29
30
pika .ConnectionParameters ( host = '127.0.0.1' , port = int (os .environ ["AMQP_PORT" ])))
30
31
channel = connection .channel ()
31
32
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
+
32
39
# publish a message to the named queue
33
40
channel .basic_publish (
34
41
exchange = '' ,
@@ -39,7 +46,7 @@ def test_exchange_dest(self):
39
46
self .assertTrue (self .listener .wait (30 ), "initial message not received" )
40
47
self .assertEqual (1 , len (self .listener .messages ))
41
48
42
- self .conn .disconnect ()
49
+ # self.conn.disconnect()
43
50
connection .close ()
44
51
while not connection .is_closed :
45
52
time .sleep (1 )
@@ -59,6 +66,12 @@ def test_topic_dest(self):
59
66
pika .ConnectionParameters ( host = '127.0.0.1' , port = int (os .environ ["AMQP_PORT" ])))
60
67
channel = connection .channel ()
61
68
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
+
62
75
# publish a message to the named queue
63
76
channel .basic_publish (
64
77
exchange = '' ,
@@ -69,7 +82,7 @@ def test_topic_dest(self):
69
82
self .assertTrue (self .listener .wait (30 ), "initial message not received" )
70
83
self .assertEqual (1 , len (self .listener .messages ))
71
84
72
- self .conn .disconnect ()
85
+ # self.conn.disconnect()
73
86
connection .close ()
74
87
while not connection .is_closed :
75
88
time .sleep (1 )
0 commit comments