Commit 201e9cd6 authored by Nick Craver's avatar Nick Craver

Tests: better logging on Cluster.ConnectUsesSingleSocket

Not sure why this is failing...we need more info. It could be socke exhaustion on the box.
parent a47c78e7
......@@ -38,22 +38,38 @@ public void ExportConfiguration()
[Fact]
public void ConnectUsesSingleSocket()
{
for (int i = 0; i < 10; i++)
using (var sw = new StringWriter())
{
try
{
for (int i = 0; i < 5; i++)
{
using (var muxer = Create(failMessage: i + ": "))
using (var muxer = Create(failMessage: i + ": ", log: sw))
{
foreach (var ep in muxer.GetEndPoints())
{
var srv = muxer.GetServer(ep);
var counters = srv.GetCounters();
Output.WriteLine(i + "; interactive, " + ep);
Output.WriteLine($"{i}; interactive, {ep}, count: {counters.Interactive.SocketCount}");
Output.WriteLine($"{i}; subscription, {ep}, count: {counters.Subscription.SocketCount}");
}
foreach (var ep in muxer.GetEndPoints())
{
var srv = muxer.GetServer(ep);
var counters = srv.GetCounters();
Assert.Equal(1, counters.Interactive.SocketCount);
Output.WriteLine(i + "; subscription, " + ep);
Assert.Equal(1, counters.Subscription.SocketCount);
}
}
}
}
finally
{
// Connection info goes at the end...
Output.WriteLine(sw.ToString());
}
}
}
[Fact]
public void CanGetTotalStats()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment