qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1155545 - in /qpid/trunk/qpid: cpp/src/qpid/broker/Broker.cpp cpp/src/qpid/cluster/UpdateClient.cpp cpp/src/tests/federation_sys.py tests/src/py/qpid_tests/broker_0_10/exchange.py
Date Tue, 09 Aug 2011 20:19:54 GMT
Author: gsim
Date: Tue Aug  9 20:19:54 2011
New Revision: 1155545

URL: http://svn.apache.org/viewvc?rev=1155545&view=rev
Log:
QPID-3363: prevent bind/unbind on default exchange

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
    qpid/trunk/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
    qpid/trunk/qpid/cpp/src/tests/federation_sys.py
    qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp?rev=1155545&r1=1155544&r2=1155545&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/Broker.cpp Tue Aug  9 20:19:54 2011
@@ -916,6 +916,9 @@ void Broker::bind(const std::string& que
         if (!acl->authorise(userId,acl::ACT_BIND,acl::OBJ_EXCHANGE,exchangeName,&params))
             throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange bind
request from " << userId));
     }
+    if (exchangeName.empty()) {
+        throw framing::NotAllowedException(QPID_MSG("Bind not allowed for default exchange"));
+    }
 
     Queue::shared_ptr queue = queues.find(queueName);
     Exchange::shared_ptr exchange = exchanges.get(exchangeName);
@@ -946,13 +949,15 @@ void Broker::unbind(const std::string& q
         if (!acl->authorise(userId,acl::ACT_UNBIND,acl::OBJ_EXCHANGE,exchangeName,&params)
)
             throw framing::UnauthorizedAccessException(QPID_MSG("ACL denied exchange unbind
request from " << userId));
     }
-
+    if (exchangeName.empty()) {
+        throw framing::NotAllowedException(QPID_MSG("Unbind not allowed for default exchange"));
+    }
     Queue::shared_ptr queue = queues.find(queueName);
     Exchange::shared_ptr exchange = exchanges.get(exchangeName);
     if (!queue) {
-        throw framing::NotFoundException(QPID_MSG("Bind failed. No such queue: " <<
queueName));
+        throw framing::NotFoundException(QPID_MSG("Unbind failed. No such queue: " <<
queueName));
     } else if (!exchange) {
-        throw framing::NotFoundException(QPID_MSG("Bind failed. No such exchange: " <<
exchangeName));
+        throw framing::NotFoundException(QPID_MSG("Unbind failed. No such exchange: " <<
exchangeName));
     } else {
         if (exchange->unbind(queue, key, 0)) {
             if (exchange->isDurable() && queue->isDurable()) {

Modified: qpid/trunk/qpid/cpp/src/qpid/cluster/UpdateClient.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/cluster/UpdateClient.cpp?rev=1155545&r1=1155544&r2=1155545&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/cluster/UpdateClient.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/cluster/UpdateClient.cpp Tue Aug  9 20:19:54 2011
@@ -402,7 +402,11 @@ void UpdateClient::updateNonExclusiveQue
 }
 
 void UpdateClient::updateBinding(client::AsyncSession& s, const std::string& queue,
const QueueBinding& binding) {
-    s.exchangeBind(queue, binding.exchange, binding.key, binding.args);
+    if (binding.exchange.size())
+        s.exchangeBind(queue, binding.exchange, binding.key, binding.args);
+    //else its the default exchange and there is no need to replicate
+    //the binding, the creation of the queue will have done so
+    //automatically
 }
 
 void UpdateClient::updateOutputTask(const sys::OutputTask* task) {

Modified: qpid/trunk/qpid/cpp/src/tests/federation_sys.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/federation_sys.py?rev=1155545&r1=1155544&r2=1155545&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/federation_sys.py (original)
+++ qpid/trunk/qpid/cpp/src/tests/federation_sys.py Tue Aug  9 20:19:54 2011
@@ -574,7 +574,7 @@ class QmfTestBase010(TestBase010):
     
     def _do_test(self,
                  test_name,                         # Name of test
-                 exch_name = "",                    # Remote exchange name
+                 exch_name = "amq.direct",          # Remote exchange name
                  exch_type = "direct",              # Remote exchange type
                  exch_alt_exch = "",                # Remote exchange alternate exchange
                  exch_alt_exch_type = "direct",     # Remote exchange alternate exchange
type
@@ -726,23 +726,6 @@ class B_LongTransactionTests(QmfTestBase
         self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count
= 103)
 
 
-    def test_txEnq01_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1)
-        
-    def test_txEnq01_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1)
-
-    def test_txEnq10_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=10, msg_count
= 103)
-        
-    def test_txEnq10_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=10, msg_count = 103)
-
-    def test_txEnq01_txDeq01_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1, deq_txn_size=1)
-        
-    def test_txEnq01_txDeq01_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1, deq_txn_size=1)
 
 
     def test_txEnq01_route_directExch(self):
@@ -825,25 +808,6 @@ class C_ShortClusterTests(QmfTestBase010
 
 class C_LongClusterTests(QmfTestBase010):
     
-    def test_locCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", local_cluster_flag=True)
-        
-    def test_locCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
local_cluster_flag=True)
-    
-    def test_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", remote_cluster_flag=True)
-        
-    def test_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
remote_cluster_flag=True)
-    
-    def test_locCluster_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", local_cluster_flag=True,
remote_cluster_flag=True)
-        
-    def test_locCluster_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
local_cluster_flag=True, remote_cluster_flag=True)
-
-    
     def test_locCluster_route_directExch(self):
         self._do_test(self._get_name(), exch_name="testDirectExchange", local_cluster_flag=True)
         
@@ -961,61 +925,6 @@ class D_LongClusterTransactionTests(QmfT
         self._do_test(self._get_name(), queue_route_type_flag=True, enq_txn_size=10, msg_count
= 103, local_cluster_flag=True, remote_cluster_flag=True)
 
 
-    def test_txEnq01_locCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1, local_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1, local_cluster_flag=True)
-
-    def test_txEnq10_locCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=10, msg_count
= 103, local_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
-       
-    def test_txEnq01_txDeq01_locCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1, deq_txn_size=1,
local_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
-
-    def test_txEnq01_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1, remote_cluster_flag=True)
-        
-    def test_txEnq01_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1, remote_cluster_flag=True)
-
-    def test_txEnq10_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=10, msg_count
= 103, remote_cluster_flag=True)
-        
-    def test_txEnq10_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
-       
-    def test_txEnq01_txDeq01_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1, deq_txn_size=1,
remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
-
-    def test_txEnq01_locCluster_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1, local_cluster_flag=True,
remote_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-
-    def test_txEnq10_locCluster_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=10, msg_count
= 103, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
-       
-    def test_txEnq01_txDeq01_locCluster_remCluster_route_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", enq_txn_size=1, deq_txn_size=1,
local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_route_type_flag=True,
enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-
-
     def test_txEnq01_locCluster_route_directExch(self):
         self._do_test(self._get_name(), exch_name="testDirectExchange", enq_txn_size=1, local_cluster_flag=True)
         
@@ -1198,18 +1107,6 @@ class E_ShortPersistenceTests(QmfTestBas
 
 class E_LongPersistenceTests(QmfTestBase010):   
 
-    def test_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True)
-        
-    def test_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True)
-        
-    def test_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True)
-        
-    def test_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True)
-
          
     def test_route_durQueue_directExch(self):
         self._do_test(self._get_name(), exch_name="testDirectExchange", queue_durable_flag=True)
@@ -1292,41 +1189,6 @@ class F_LongPersistenceTransactionTests(
         self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True,
enq_txn_size=10, msg_count = 103)
 
        
-    def test_txEnq01_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1)
-        
-    def test_txEnq01_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1)
-        
-    def test_txEnq01_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1)
-        
-    def test_txEnq01_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1)
-       
-    def test_txEnq10_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=10, msg_count = 103)
-        
-    def test_txEnq10_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=10, msg_count = 103)
-        
-    def test_txEnq10_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
-        
-    def test_txEnq10_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103)
-        
-    def test_txEnq01_txDeq01_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1)
-        
-    def test_txEnq01_txDeq01_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1)
-        
-    def test_txEnq01_txDeq01_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
-        
-    def test_txEnq01_txDeq01_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1)
 
        
     def test_txEnq01_route_durQueue_directExch(self):
@@ -1481,41 +1343,6 @@ class G_ShortPersistenceClusterTests(Qmf
 
 class G_LongPersistenceClusterTests(QmfTestBase010):   
          
-    def test_locCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
local_cluster_flag=True)
-        
-    def test_locCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
local_cluster_flag=True)
-        
-    def test_locCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, local_cluster_flag=True)
-        
-    def test_locCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, local_cluster_flag=True)
-         
-    def test_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
remote_cluster_flag=True)
-        
-    def test_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
remote_cluster_flag=True)
-        
-    def test_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, remote_cluster_flag=True)
-        
-    def test_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, remote_cluster_flag=True)
-         
-    def test_locCluster_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_locCluster_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_locCluster_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_locCluster_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, local_cluster_flag=True, remote_cluster_flag=True)
 
          
     def test_locCluster_route_durQueue_directExch(self):
@@ -1743,113 +1570,6 @@ class H_LongPersistenceClusterTransactio
         self._do_test(self._get_name(), msg_durable_flag=True, queue_durable_flag=True, queue_route_type_flag=True,
enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
 
        
-    def test_txEnq01_locCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1, local_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1, local_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True)
-       
-    def test_txEnq10_locCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True)
-       
-    def test_txEnq01_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1, remote_cluster_flag=True)
-        
-    def test_txEnq01_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1, remote_cluster_flag=True)
-        
-    def test_txEnq01_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
-        
-    def test_txEnq01_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, remote_cluster_flag=True)
-       
-    def test_txEnq10_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
-        
-    def test_txEnq10_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
-        
-    def test_txEnq10_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
-        
-    def test_txEnq10_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, remote_cluster_flag=True)
-       
-    def test_txEnq01_locCluster_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_locCluster_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-       
-    def test_txEnq10_locCluster_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq10_locCluster_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=10, msg_count = 103, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_remCluster_route_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_remCluster_route_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
-        
-    def test_txEnq01_txDeq01_locCluster_remCluster_queueRoute_durMsg_durQueue_amqDirectExch(self):
-        self._do_test(self._get_name(), exch_name="amq.direct", msg_durable_flag=True, queue_durable_flag=True,
queue_route_type_flag=True, enq_txn_size=1, deq_txn_size=1, local_cluster_flag=True, remote_cluster_flag=True)
 
        
     def test_txEnq01_locCluster_route_durQueue_directExch(self):

Modified: qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py?rev=1155545&r1=1155544&r2=1155545&view=diff
==============================================================================
--- qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py (original)
+++ qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py Tue Aug  9 20:19:54 2011
@@ -226,8 +226,6 @@ class DefaultExchangeRuleTests(TestHelpe
         # Test automatic binding by queue name.
         self.queue_declare(queue="d")
         self.assertPublishConsume(queue="d", routing_key="d")
-        # Test explicit bind to default queue
-        self.verifyDirectExchange("")
 
 
 # TODO aconway 2006-09-27: Fill in empty tests:
@@ -460,7 +458,30 @@ class MiscellaneousErrorsTests(TestHelpe
             self.fail("Expected 530 for redeclaration of exchange with different type.")
         except SessionException, e:
             self.assertEquals(530, e.args[0].error_code)
-    
+
+    def testDefaultAccessBind(self):
+        try:
+            self.session.queue_declare(queue="my-queue", auto_delete=True, exclusive=True)
+            self.session.exchange_bind(exchange="", queue="my-queue", binding_key="another-key")
+            self.fail("Expected 530 (not-allowed) code for bind to default exchange.")
+        except SessionException, e:
+            self.assertEquals(530, e.args[0].error_code)
+
+    def testDefaultAccessUnbind(self):
+        try:
+            self.session.queue_declare(queue="my-queue", auto_delete=True, exclusive=True)
+            self.session.exchange_unbind(exchange="", queue="my-queue", binding_key="my-queue")
+            self.fail("Expected 530 (not-allowed) code for unbind from default exchange.")
+        except SessionException, e:
+            self.assertEquals(530, e.args[0].error_code)
+
+    def testDefaultAccessDelete(self):
+        try:
+            self.session.exchange_delete(exchange="")
+            self.fail("Expected 530 (not-allowed) code for delete of default exchange.")
+        except SessionException, e:
+            self.assertEquals(530, e.args[0].error_code)
+
 class ExchangeTests(TestHelper):
     def testHeadersBindNoMatchArg(self):
         self.session.queue_declare(queue="q", exclusive=True, auto_delete=True)



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org


Mime
View raw message