Skip to content

Commit 7d69564

Browse files
committed
Delete queue in NIO TLS test
1 parent 82d0fb0 commit 7d69564

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/test/java/com/rabbitmq/client/test/ssl/NioTlsUnverifiedConnection.java

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
*/
3737
public 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

Comments
 (0)