You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/08/09 13:58:00 UTC
[jira] [Commented] (QPIDJMS-312) Exception is not thrown when user
attempts to create context with invalid session mode value
[ https://issues.apache.org/jira/browse/QPIDJMS-312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16119930#comment-16119930 ]
ASF subversion and git services commented on QPIDJMS-312:
---------------------------------------------------------
Commit d4d318d5592d270282326a38a47b1e893dd44784 in qpid-jms's branch refs/heads/master from [~tabish121]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-jms.git;h=d4d318d ]
QPIDJMS-312 Add check for session mode range
Update JmsContext with missing check for session mode range
> Exception is not thrown when user attempts to create context with invalid session mode value
> --------------------------------------------------------------------------------------------
>
> Key: QPIDJMS-312
> URL: https://issues.apache.org/jira/browse/QPIDJMS-312
> Project: Qpid JMS
> Issue Type: Bug
> Components: qpid-jms-client
> Affects Versions: 0.24.0
> Reporter: Jiri Danek
> Priority: Trivial
> Fix For: 0.25.0
>
>
> Consider Apache ActiveMQ Artemis tests {{org.apache.activemq.artemis.tests.integration.jms.jms2client.JmsContextTest#testInvalidSessionModesValueMinusOne}} and {{#testInvalidSessionModesValue4}} (in the same class).
> When it is adapted to run with multiple JMS clients, or when run from the standalone reproducer at https://github.com/jdanekrh/jms-reproducers/blob/master/src/test/java/org/apache/activemq/artemis/tests/integration/jms/jms2client/JmsContextTest.java
> (the standalone reproducer requires a running broker to connect to), the test passes with Core, is skipped on OpenWire (because that is not a JMS 2.0 client) and fails on AMQP protocol (with qpid-jms-client as the JMS library):
> {noformat}
> @Test(expected = JMSRuntimeException.class)
> public void testInvalidSessionModesValueMinusOne() {
> context.createContext(-1);
> }
> @Test(expected = JMSRuntimeException.class)
> public void testInvalidSessionModesValue4() {
> context.createContext(4);
> }
> {noformat}
> with exception
> {noformat}
> java.lang.AssertionError: Expected exception: javax.jms.JMSRuntimeException
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org