Beispiel #1
0
 def test_ambiguous_delete_2(self):
     agent = BrokerAgent(self.conn)
     agent.addExchange("fanout", "ambiguous")
     agent.addQueue("ambiguous")
     self.ssn.receiver("ambiguous; {delete:receiver, node:{type:queue}}").close()
     exchange = agent.getExchange("ambiguous")
     queue = agent.getQueue("ambiguous")
     try:
         assert(exchange)
         assert(not queue)
     finally:
         if exchange: agent.delExchange("ambiguous")
         if queue: agent.delQueue("ambiguous", False, False)
Beispiel #2
0
 def test_ambiguous_delete_2(self):
     agent = BrokerAgent(self.conn)
     agent.addExchange("fanout", "ambiguous")
     agent.addQueue("ambiguous")
     self.ssn.receiver(
         "ambiguous; {delete:receiver, node:{type:queue}}").close()
     exchange = agent.getExchange("ambiguous")
     queue = agent.getQueue("ambiguous")
     try:
         assert (exchange)
         assert (not queue)
     finally:
         if exchange: agent.delExchange("ambiguous")
         if queue: agent.delQueue("ambiguous", False, False)
Beispiel #3
0
 def test_ambiguous_create_2(self):
     #create exchange first, then queue
     r1 = self.ssn.receiver("ambiguous; {create:receiver, node:{type:topic}}")
     r2 = self.ssn.receiver("ambiguous; {create:receiver, node:{type:queue}}")
     agent = BrokerAgent(self.conn)
     exchange = agent.getExchange("ambiguous")
     queue = agent.getQueue("ambiguous")
     try:
         assert(exchange)
         assert(queue)
         self._node_disambiguation_test(r1, r2)
     finally:
         if exchange: agent.delExchange("ambiguous")
         if queue: agent.delQueue("ambiguous", False, False)
Beispiel #4
0
 def test_ambiguous_create_2(self):
     #create exchange first, then queue
     r1 = self.ssn.receiver(
         "ambiguous; {create:receiver, node:{type:topic}}")
     r2 = self.ssn.receiver(
         "ambiguous; {create:receiver, node:{type:queue}}")
     agent = BrokerAgent(self.conn)
     exchange = agent.getExchange("ambiguous")
     queue = agent.getQueue("ambiguous")
     try:
         assert (exchange)
         assert (queue)
         self._node_disambiguation_test(r1, r2)
     finally:
         if exchange: agent.delExchange("ambiguous")
         if queue: agent.delQueue("ambiguous", False, False)