Uploaded image for project: 'Qpid JMS'
  1. Qpid JMS
  2. QPIDJMS-312

Exception is not thrown when user attempts to create context with invalid session mode value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 0.24.0
    • 0.25.0
    • qpid-jms-client
    • None

    Description

      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):

         @Test(expected = JMSRuntimeException.class)
         public void testInvalidSessionModesValueMinusOne() {
            context.createContext(-1);
         }
      
         @Test(expected = JMSRuntimeException.class)
         public void testInvalidSessionModesValue4() {
            context.createContext(4);
         }
      

      with exception

          java.lang.AssertionError: Expected exception: javax.jms.JMSRuntimeException
      

      Attachments

        Issue Links

          Activity

            People

              tabish Timothy A. Bish
              jdanek Jiri Daněk
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: