Throwable possibleAuthException = ex.getCause().getCause(); if (!(possibleAuthException instanceof PossibleAuthenticationFailureException)) { throw ex;
Throwable possibleAuthException = ex.getCause().getCause(); if (!(possibleAuthException instanceof PossibleAuthenticationFailureException)) { throw ex;
@Test public void testAvoidHangAMQP_508() { CachingConnectionFactory connectionFactory = new CachingConnectionFactory("localhost"); String longName = new String(new byte[300]).replace('\u0000', 'x'); BlockingQueueConsumer blockingQueueConsumer = new BlockingQueueConsumer(connectionFactory, new DefaultMessagePropertiesConverter(), new ActiveObjectCounter<BlockingQueueConsumer>(), AcknowledgeMode.AUTO, true, 1, longName, "foobar"); try { blockingQueueConsumer.start(); fail("expected exception"); } catch (FatalListenerStartupException e) { assertThat(e.getCause(), instanceOf(IllegalArgumentException.class)); } connectionFactory.destroy(); }