File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
test/src/com/rabbitmq/client/test/server Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ public class MemoryAlarms extends BrokerTestCase {
53
53
protected void setUp ()
54
54
throws IOException
55
55
{
56
+ connectionFactory .setRequestedHeartbeat (1 );
56
57
super .setUp ();
57
58
if (connection2 == null ) {
58
59
connection2 = connectionFactory .newConnection ();
@@ -73,6 +74,7 @@ protected void tearDown()
73
74
connection2 = null ;
74
75
}
75
76
super .tearDown ();
77
+ connectionFactory .setRequestedHeartbeat (0 );
76
78
}
77
79
78
80
@ Override
@@ -113,6 +115,8 @@ public void testFlowControl()
113
115
//publishes after an alarm should not go through
114
116
basicPublishVolatile (Q );
115
117
assertNull (c .nextDelivery (10 )); //the publish is async, so this is racy
118
+ //heartbeat monitoring should be disabled
119
+ Thread .sleep (3100 ); //3x heartbeat interval + epsilon
116
120
//once the alarm has cleared the publishes should go through
117
121
clearMemoryAlarm ();
118
122
assertNotNull (c .nextDelivery ());
You can’t perform that action at this time.
0 commit comments