Skip to content

Commit 736a991

Browse files
Merge branch 'stable'
2 parents b5c6155 + b481fb9 commit 736a991

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,9 @@ protected void PerformLeakTest(ConnectionFactory cf)
8484
Thread.Sleep(TimeSpan.FromSeconds(10));
8585
me = Process.GetCurrentProcess();
8686
Console.WriteLine("{0} handles after the test...", me.HandleCount);
87-
Assert.That(me.HandleCount, Is.LessThanOrEqualTo(n));
87+
// allow for a 20% margin of error, as GC behaviour and native handle
88+
// release is difficult to predict
89+
Assert.That(me.HandleCount, Is.LessThanOrEqualTo(n + 200));
8890
}
8991
}
9092
}

0 commit comments

Comments
 (0)