File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed
test/src/com/rabbitmq/client/test/server Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 2222import junit .framework .TestSuite ;
2323
2424public class HATests extends TestSuite {
25+ public static boolean HA_TESTS_RUNNING = false ;
26+
2527 public static TestSuite suite () {
2628 TestSuite suite = new TestSuite ("server-tests" );
2729 suite .addTestSuite (SetUp .class );
@@ -38,6 +40,7 @@ public static class SetUp extends TestCase {
3840 @ Override
3941 protected void setUp () throws Exception {
4042 Host .executeCommand ("cd ../rabbitmq-test; make enable-ha" );
43+ HA_TESTS_RUNNING = true ;
4144 }
4245
4346 public void testNothing () {}
@@ -47,6 +50,7 @@ public static class TearDown extends TestCase {
4750 @ Override
4851 protected void tearDown () throws Exception {
4952 Host .executeCommand ("cd ../rabbitmq-test; make disable-ha" );
53+ HA_TESTS_RUNNING = false ;
5054 }
5155
5256 public void testNothing () {}
Original file line number Diff line number Diff line change @@ -34,7 +34,10 @@ public void testMessageRecovery()
3434 waitForConfirms ();
3535
3636 restart ();
37- assertDelivered (Q , 1 );
37+
38+ // When testing in HA mode the message will be collected from a promoted
39+ // slave and wil have its redelivered flag set.
40+ assertDelivered (Q , 1 , HATests .HA_TESTS_RUNNING );
3841 channel .queueDelete (Q );
3942 }
4043
You can’t perform that action at this time.
0 commit comments