Skip to content

Commit 250ea3d

Browse files
Separate connection churn test into two
1 parent 2b85817 commit 250ea3d

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

projects/client/Unit/src/unit/TestConnectionChurnHandleLeak.cs

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,27 @@ namespace RabbitMQ.Client.Unit
5050
public class TestConnectionChurnHandleLeak : IntegrationFixture
5151
{
5252
[Test]
53-
public void TestHandleLeak()
53+
public void TestHandleLeakWithDisabledHeartbeats()
54+
{
55+
var cf = new ConnectionFactory()
56+
{
57+
RequestedHeartbeat = 0
58+
};
59+
PerformLeakTest(cf);
60+
}
61+
62+
[Test]
63+
public void TestHandleLeakWithEnabledHeartbeats()
64+
{
65+
var cf = new ConnectionFactory()
66+
{
67+
RequestedHeartbeat = 16
68+
};
69+
PerformLeakTest(cf);
70+
}
71+
72+
protected void PerformLeakTest(ConnectionFactory cf)
5473
{
55-
var cf = new ConnectionFactory();
5674
var me = Process.GetCurrentProcess();
5775
var n = me.HandleCount;
5876
Console.WriteLine("{0} handles before the test...", me.HandleCount);

0 commit comments

Comments
 (0)