Skip to content

Commit fdedd80

Browse files
committed
refactor confirm tests and test more combinations of p&m&i
1 parent 82ae95f commit fdedd80

File tree

1 file changed

+10
-19
lines changed

1 file changed

+10
-19
lines changed

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

Lines changed: 10 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,18 @@ protected void setUp() throws IOException {
6363
"confirm-multiple-queues");
6464
}
6565

66-
public void testTransient()
67-
throws IOException, InterruptedException {
68-
confirmTest("", "confirm-test", false, false, false);
69-
}
70-
71-
public void testPersistentSimple()
66+
public void testPersistentMandatoryImmediateCombinations()
7267
throws IOException, InterruptedException
7368
{
74-
confirmTest("", "confirm-test", true, false, false);
69+
boolean b[] = { false, true };
70+
for (boolean persistent : b) {
71+
for (boolean mandatory : b) {
72+
for (boolean immediate : b) {
73+
confirmTest("", "confirm-test",
74+
persistent, mandatory, immediate);
75+
}
76+
}
77+
}
7578
}
7679

7780
public void testNonDurable()
@@ -80,24 +83,12 @@ public void testNonDurable()
8083
confirmTest("", "confirm-test-nondurable", true, false, false);
8184
}
8285

83-
public void testPersistentImmediate()
84-
throws IOException, InterruptedException
85-
{
86-
confirmTest("", "confirm-test", true, false, true);
87-
}
88-
8986
public void testPersistentImmediateNoConsumer()
9087
throws IOException, InterruptedException
9188
{
9289
confirmTest("", "confirm-test-noconsumer", true, false, true);
9390
}
9491

95-
public void testPersistentMandatory()
96-
throws IOException, InterruptedException
97-
{
98-
confirmTest("", "confirm-test", true, true, false);
99-
}
100-
10192
public void testPersistentMandatoryReturn()
10293
throws IOException, InterruptedException
10394
{

0 commit comments

Comments
 (0)