diff options
| author | Robert Gemmell <robbie@apache.org> | 2011-08-04 12:31:24 +0000 |
|---|---|---|
| committer | Robert Gemmell <robbie@apache.org> | 2011-08-04 12:31:24 +0000 |
| commit | 2113e07e1c799bb8f50288dd4ca932b304ceedf1 (patch) | |
| tree | 3ae2d3b9a92283d3a4ed2405ed5814d2f6850ebf /qpid/java/broker | |
| parent | ade525cb34cb227409fbc9c300bc86b385eceec9 (diff) | |
| download | qpid-python-2113e07e1c799bb8f50288dd4ca932b304ceedf1.tar.gz | |
QPID-2903, QPID-3390, QPID-3392: split tests into those with and without exchange creation arguments, add verification of exchange declare arguments, add new test to validate behaviour when supplying nonsense/unsupported arguments, exclude failign tests until functionality is implemented
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1153864 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker')
| -rw-r--r-- | qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java index a2f92af8e3..f316d60c6a 100644 --- a/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java +++ b/qpid/java/broker/src/main/java/org/apache/qpid/server/transport/ServerSessionDelegate.java @@ -457,6 +457,19 @@ public class ServerSessionDelegate extends SessionDelegate VirtualHost virtualHost = getVirtualHost(session); Exchange exchange = getExchange(session, exchangeName); + //we must check for any unsupported arguments present and throw not-implemented + if(method.hasArguments()) + { + Map<String,Object> args = method.getArguments(); + + //QPID-3392: currently we don't support any! + if(!args.isEmpty()) + { + exception(session, method, ExecutionErrorCode.NOT_IMPLEMENTED, "Unsupported exchange argument(s) found " + args.keySet().toString()); + return; + } + } + if(method.getPassive()) { if(exchange == null) @@ -466,7 +479,6 @@ public class ServerSessionDelegate extends SessionDelegate } else { - // TODO - check exchange has same properties if(!exchange.getTypeShortString().toString().equals(method.getType())) { exception(session, method, ExecutionErrorCode.NOT_ALLOWED, "Cannot redeclare with a different exchange type"); |
