You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rg...@apache.org on 2019/11/19 10:57:23 UTC

[qpid-broker-j] branch master updated: QPID-8377 : add test to verify IGNORE behaviour

This is an automated email from the ASF dual-hosted git repository.

rgodfrey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-broker-j.git


The following commit(s) were added to refs/heads/master by this push:
     new 8a2a025  QPID-8377 : add test to verify IGNORE behaviour
8a2a025 is described below

commit 8a2a02521a76f889e23d89f67ff025e73b578df5
Author: Robert Godfrey <rg...@apache.org>
AuthorDate: Tue Nov 19 11:57:11 2019 +0100

    QPID-8377 : add test to verify IGNORE behaviour
---
 .../ExchangeDeclareInvalidOptionBehaviourTest.java | 67 ++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/extension/exchange/ExchangeDeclareInvalidOptionBehaviourTest.java b/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/extension/exchange/ExchangeDeclareInvalidOptionBehaviourTest.java
new file mode 100644
index 0000000..2555024
--- /dev/null
+++ b/systests/protocol-tests-amqp-0-8/src/test/java/org/apache/qpid/tests/protocol/v0_8/extension/exchange/ExchangeDeclareInvalidOptionBehaviourTest.java
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+package org.apache.qpid.tests.protocol.v0_8.extension.exchange;
+
+import static org.apache.qpid.tests.utils.BrokerAdmin.KIND_BROKER_J;
+import static org.hamcrest.CoreMatchers.equalTo;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Collections;
+
+import org.junit.Test;
+
+import org.apache.qpid.server.protocol.ErrorCodes;
+import org.apache.qpid.server.protocol.v0_8.transport.ChannelOpenOkBody;
+import org.apache.qpid.server.protocol.v0_8.transport.ConnectionCloseBody;
+import org.apache.qpid.server.protocol.v0_8.transport.ExchangeBoundOkBody;
+import org.apache.qpid.server.protocol.v0_8.transport.ExchangeDeclareOkBody;
+import org.apache.qpid.tests.protocol.v0_8.FrameTransport;
+import org.apache.qpid.tests.protocol.v0_8.Interaction;
+import org.apache.qpid.tests.utils.BrokerAdminUsingTestBase;
+import org.apache.qpid.tests.utils.BrokerSpecific;
+import org.apache.qpid.tests.utils.ConfigItem;
+
+@BrokerSpecific(kind = KIND_BROKER_J)
+@ConfigItem(name = "exchange.behaviourOnUnknownDeclareArgument", value = "IGNORE")
+public class ExchangeDeclareInvalidOptionBehaviourTest extends BrokerAdminUsingTestBase
+{
+    private static final String TEST_EXCHANGE = "testExchange";
+
+    @Test
+    public void exchangeDeclareInvalidWireArguments() throws Exception
+    {
+        try (FrameTransport transport = new FrameTransport(getBrokerAdmin()).connect())
+        {
+            final Interaction interaction = transport.newInteraction();
+            interaction.negotiateOpen()
+                       .channel()
+                       .open()
+                       .consumeResponse(ChannelOpenOkBody.class)
+                       .exchange()
+                       .declareName(TEST_EXCHANGE)
+                       .declareArguments(Collections.singletonMap("foo", "bar"))
+                       .declare()
+                       .consumeResponse(ExchangeDeclareOkBody.class);
+
+
+        }
+    }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org