Github user cshannon commented on a diff in the pull request: https://github.com/apache/activemq-artemis/pull/2116#discussion_r191788973 --- Diff: tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/SessionMetadataAddExceptionTest.java --- @@ -75,6 +88,24 @@ public void testInvalidClientIdSetFactory() throws Exception { cf.createConnection(); } + @Test(timeout = 5000, expected = JMSException.class) + public void testDuplicateClientIdSet() throws Exception { + ActiveMQConnectionFactory activeMQConnectionFactory = (ActiveMQConnectionFactory) cf; + Connection con = cf.createConnection(); + Connection con2 = cf.createConnection(); + try { + con.setClientID("valid"); + con2.setClientID("valid"); + fail("Should have failed for duplicate clientId"); + } catch (Exception e) { --- End diff -- I also added another test to verify that ActiveMQException bubbles up and is converted to a JMSException by the client
---