3636 */
3737public class NioTlsUnverifiedConnection extends BrokerTestCase {
3838
39+ public static final String QUEUE = "tls.nio.queue" ;
40+
3941 public void openConnection ()
4042 throws IOException , TimeoutException {
4143 try {
@@ -61,10 +63,15 @@ public void openConnection()
6163
6264 }
6365
66+ @ Override
67+ protected void releaseResources () throws IOException {
68+ channel .queueDelete (QUEUE );
69+ }
70+
6471 @ Test
6572 public void connectionGetConsume () throws Exception {
6673 CountDownLatch latch = new CountDownLatch (1 );
67- connection = basicGetBasicConsume (connection , "tls.nio.queue" , latch , 100 * 1000 );
74+ connection = basicGetBasicConsume (connection , QUEUE , latch , 100 * 1000 );
6875 boolean messagesReceived = latch .await (5 , TimeUnit .SECONDS );
6976 assertTrue ("Message has not been received" , messagesReceived );
7077 }
@@ -113,7 +120,7 @@ public void configure(SSLEngine sslEngine) throws IOException {
113120
114121 private void sendAndVerifyMessage (int size ) throws Exception {
115122 CountDownLatch latch = new CountDownLatch (1 );
116- connection = basicGetBasicConsume (connection , "tls.nio.queue" , latch , size );
123+ connection = basicGetBasicConsume (connection , QUEUE , latch , size );
117124 boolean messagesReceived = latch .await (5 , TimeUnit .SECONDS );
118125 assertTrue ("Message has not been received" , messagesReceived );
119126 }
0 commit comments