Skip to content

Commit 2e5ecf4

Browse files
committed
Merge branch '5.2.x-stable'
2 parents 9cdbf2f + 555a16e commit 2e5ecf4

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

src/test/java/com/rabbitmq/client/test/functional/ConnectionRecovery.java

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@
4545
public class ConnectionRecovery extends BrokerTestCase {
4646
private static final long RECOVERY_INTERVAL = 2000;
4747

48+
private static final int MANY_DECLARATIONS_LOOP_COUNT = 500;
49+
4850
@Test public void connectionRecovery() throws IOException, InterruptedException {
4951
assertTrue(connection.isOpen());
5052
closeAndWaitForRecovery();
@@ -416,7 +418,7 @@ public void queueRecovered(String oldName, String newName) {
416418
@Test public void declarationOfManyAutoDeleteQueuesWithTransientConsumer() throws IOException, TimeoutException {
417419
Channel ch = connection.createChannel();
418420
assertRecordedQueues(connection, 0);
419-
for(int i = 0; i < 5000; i++) {
421+
for(int i = 0; i < MANY_DECLARATIONS_LOOP_COUNT; i++) {
420422
String q = UUID.randomUUID().toString();
421423
ch.queueDeclare(q, false, false, true, null);
422424
DefaultConsumer dummy = new DefaultConsumer(ch);
@@ -430,7 +432,7 @@ public void queueRecovered(String oldName, String newName) {
430432
@Test public void declarationOfManyAutoDeleteExchangesWithTransientQueuesThatAreUnbound() throws IOException, TimeoutException {
431433
Channel ch = connection.createChannel();
432434
assertRecordedExchanges(connection, 0);
433-
for(int i = 0; i < 5000; i++) {
435+
for(int i = 0; i < MANY_DECLARATIONS_LOOP_COUNT; i++) {
434436
String x = UUID.randomUUID().toString();
435437
ch.exchangeDeclare(x, "fanout", false, true, null);
436438
String q = ch.queueDeclare().getQueue();
@@ -446,7 +448,7 @@ public void queueRecovered(String oldName, String newName) {
446448
@Test public void declarationOfManyAutoDeleteExchangesWithTransientQueuesThatAreDeleted() throws IOException, TimeoutException {
447449
Channel ch = connection.createChannel();
448450
assertRecordedExchanges(connection, 0);
449-
for(int i = 0; i < 5000; i++) {
451+
for(int i = 0; i < MANY_DECLARATIONS_LOOP_COUNT; i++) {
450452
String x = UUID.randomUUID().toString();
451453
ch.exchangeDeclare(x, "fanout", false, true, null);
452454
String q = ch.queueDeclare().getQueue();
@@ -460,7 +462,7 @@ public void queueRecovered(String oldName, String newName) {
460462
@Test public void declarationOfManyAutoDeleteExchangesWithTransientExchangesThatAreUnbound() throws IOException, TimeoutException {
461463
Channel ch = connection.createChannel();
462464
assertRecordedExchanges(connection, 0);
463-
for(int i = 0; i < 5000; i++) {
465+
for(int i = 0; i < MANY_DECLARATIONS_LOOP_COUNT; i++) {
464466
String src = "src-" + UUID.randomUUID().toString();
465467
String dest = "dest-" + UUID.randomUUID().toString();
466468
ch.exchangeDeclare(src, "fanout", false, true, null);
@@ -477,7 +479,7 @@ public void queueRecovered(String oldName, String newName) {
477479
@Test public void declarationOfManyAutoDeleteExchangesWithTransientExchangesThatAreDeleted() throws IOException, TimeoutException {
478480
Channel ch = connection.createChannel();
479481
assertRecordedExchanges(connection, 0);
480-
for(int i = 0; i < 5000; i++) {
482+
for(int i = 0; i < MANY_DECLARATIONS_LOOP_COUNT; i++) {
481483
String src = "src-" + UUID.randomUUID().toString();
482484
String dest = "dest-" + UUID.randomUUID().toString();
483485
ch.exchangeDeclare(src, "fanout", false, true, null);

0 commit comments

Comments
 (0)