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,20 +38,36 @@ public void ExportConfiguration() ...@@ -38,20 +38,36 @@ public void ExportConfiguration()
[Fact] [Fact]
public void ConnectUsesSingleSocket() public void ConnectUsesSingleSocket()
{ {
for (int i = 0; i < 10; i++) using (var sw = new StringWriter())
{ {
using (var muxer = Create(failMessage: i + ": ")) try
{ {
foreach (var ep in muxer.GetEndPoints()) for (int i = 0; i < 5; i++)
{ {
var srv = muxer.GetServer(ep); using (var muxer = Create(failMessage: i + ": ", log: sw))
var counters = srv.GetCounters(); {
Output.WriteLine(i + "; interactive, " + ep); foreach (var ep in muxer.GetEndPoints())
Assert.Equal(1, counters.Interactive.SocketCount); {
Output.WriteLine(i + "; subscription, " + ep); var srv = muxer.GetServer(ep);
Assert.Equal(1, counters.Subscription.SocketCount); var counters = srv.GetCounters();
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);
Assert.Equal(1, counters.Subscription.SocketCount);
}
}
} }
} }
finally
{
// Connection info goes at the end...
Output.WriteLine(sw.ToString());
}
} }
} }
......
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