Java 30676 :- Make minor modifications to work with docker compose (#15783)

This commit is contained in:
Amit Pandey 2024-02-01 19:02:57 +05:30 committed by GitHub
parent 19aaa777d5
commit 59e33914a7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View File

@ -12,7 +12,7 @@ class ConnectionPerChannelPublisherLiveTest {
// host, workerCount, iterations, payloadSize
Stream.of(1,5,10,20,50,100,150)
.forEach(workers -> {
ConnectionPerChannelPublisher.main(new String[]{"192.168.99.100", Integer.toString(workers), "1000", "4096"});
ConnectionPerChannelPublisher.main(new String[]{"localhost", Integer.toString(workers), "1000", "4096"});
});
}

View File

@ -10,9 +10,9 @@ class SingleConnectionPublisherLiveTest {
@Test
void whenSingleChannel_thenRunBenchmark() throws Exception {
// host, workerCount, iterations, payloadSize
Stream.of(1,5,10,20,50,100,150)
Stream.of(1,5,10,20,50)
.forEach(workers -> {
SingleConnectionPublisher.main(new String[]{"192.168.99.100", Integer.toString(workers), "1000", "4096"});
SingleConnectionPublisher.main(new String[]{"localhost", Integer.toString(workers), "1000", "4096"});
});
}

View File

@ -56,11 +56,17 @@ public class DynamicQueueCreationLiveTest {
@Test
void givenQueueName_whenQueueDoesNotExist_thenCheckingIfQueueExists() throws IOException, TimeoutException {
try (Channel channel = connection.createChannel()) {
Channel temp = null;
try {
Channel channel = connection.createChannel();
assertThrows(IOException.class, () -> {
channel.queueDeclarePassive(QUEUE_NAME_NEW);
});
temp = channel;
} finally {
if(temp != null && temp.isOpen()) {
temp.close();
}
}
}