qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g...@apache.org
Subject svn commit: r1074634 - in /qpid/trunk/qpid: cpp/src/qpid/broker/SessionAdapter.cpp tests/src/py/qpid_tests/broker_0_10/exchange.py
Date Fri, 25 Feb 2011 17:10:06 GMT
Author: gsim
Date: Fri Feb 25 17:10:05 2011
New Revision: 1074634

URL: http://svn.apache.org/viewvc?rev=1074634&view=rev
Log:
QPID-2326: correct exception code for unknown exchange type

Modified:
    qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
    qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_10/exchange.py

Modified: qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp?rev=1074634&r1=1074633&r2=1074634&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/broker/SessionAdapter.cpp Fri Feb 25 17:10:05 2011
@@ -114,7 +114,7 @@ void SessionAdapter::ExchangeHandlerImpl
                                                                  "existing"));
             }
         }catch(UnknownExchangeTypeException& /*e*/){
-            throw CommandInvalidException(QPID_MSG("Exchange type not implemented: " <<
type));
+            throw NotFoundException(QPID_MSG("Exchange type not implemented: " << type));
         }
     }
 }

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=1074634&r1=1074633&r2=1074634&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 Fri Feb 25 17:10:05 2011
@@ -448,9 +448,9 @@ class MiscellaneousErrorsTests(TestHelpe
     def testTypeNotKnown(self):
         try:
             self.session.exchange_declare(exchange="test_type_not_known_exchange", type="invalid_type")
-            self.fail("Expected 503 for declaration of unknown exchange type.")
+            self.fail("Expected 404 for declaration of unknown exchange type.")
         except SessionException, e:
-            self.assertEquals(503, e.args[0].error_code)
+            self.assertEquals(404, e.args[0].error_code)
 
     def testDifferentDeclaredType(self):
         self.exchange_declare(exchange="test_different_declared_type_exchange", type="direct")



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


Mime
View raw message