From 2113e07e1c799bb8f50288dd4ca932b304ceedf1 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 4 Aug 2011 12:31:24 +0000 Subject: 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 --- .../qpid/server/transport/ServerSessionDelegate.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'qpid/java/broker') 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 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"); -- cgit v1.2.1