Adds clear logging for peer helper invocations.
This commit is contained in:
parent
1016f568b8
commit
8c85cd22bb
|
@ -21,6 +21,7 @@ namespace DistTestCore.Helpers
|
||||||
|
|
||||||
public void AssertFullyConnected(params IOnlineCodexNode[] nodes)
|
public void AssertFullyConnected(params IOnlineCodexNode[] nodes)
|
||||||
{
|
{
|
||||||
|
test.Debug($"Asserting peers are fully-connected for nodes: '{string.Join(",", nodes.Select(n => n.GetName()))}'...");
|
||||||
var entries = CreateEntries(nodes);
|
var entries = CreateEntries(nodes);
|
||||||
var pairs = CreatePairs(entries);
|
var pairs = CreatePairs(entries);
|
||||||
|
|
||||||
|
@ -33,6 +34,7 @@ namespace DistTestCore.Helpers
|
||||||
{
|
{
|
||||||
Assert.Fail(string.Join(Environment.NewLine, pairs.Select(p => p.GetMessage())));
|
Assert.Fail(string.Join(Environment.NewLine, pairs.Select(p => p.GetMessage())));
|
||||||
}
|
}
|
||||||
|
test.Debug($"Success! Peers are fully-connected: {string.Join(",", nodes.Select(n => n.GetName()))}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void RetryWhilePairs(List<Pair> pairs, Action action)
|
private static void RetryWhilePairs(List<Pair> pairs, Action action)
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
public void AssertFullDownloadInterconnectivity(IEnumerable<IOnlineCodexNode> nodes, ByteSize testFileSize)
|
public void AssertFullDownloadInterconnectivity(IEnumerable<IOnlineCodexNode> nodes, ByteSize testFileSize)
|
||||||
{
|
{
|
||||||
|
test.Debug($"Asserting full download interconnectivity for nodes: '{string.Join(",", nodes.Select(n => n.GetName()))}'...");
|
||||||
foreach (var node in nodes)
|
foreach (var node in nodes)
|
||||||
{
|
{
|
||||||
var uploader = node;
|
var uploader = node;
|
||||||
|
@ -26,6 +27,8 @@
|
||||||
PerformTest(uploader, downloaders);
|
PerformTest(uploader, downloaders);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
test.Debug($"Success! Full download interconnectivity for nodes: {string.Join(",", nodes.Select(n => n.GetName()))}");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void PerformTest(IOnlineCodexNode uploader, IOnlineCodexNode[] downloaders)
|
private void PerformTest(IOnlineCodexNode uploader, IOnlineCodexNode[] downloaders)
|
||||||
|
|
|
@ -56,6 +56,7 @@ namespace Tests.PeerDiscoveryTests
|
||||||
private void AssertAllNodesConnected()
|
private void AssertAllNodesConnected()
|
||||||
{
|
{
|
||||||
PeerConnectionTestHelpers.AssertFullyConnected(GetAllOnlineCodexNodes());
|
PeerConnectionTestHelpers.AssertFullyConnected(GetAllOnlineCodexNodes());
|
||||||
|
PeerDownloadTestHelpers.AssertFullDownloadInterconnectivity(GetAllOnlineCodexNodes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,6 +57,7 @@ namespace Tests.PeerDiscoveryTests
|
||||||
private void AssertAllNodesConnected()
|
private void AssertAllNodesConnected()
|
||||||
{
|
{
|
||||||
PeerConnectionTestHelpers.AssertFullyConnected(GetAllOnlineCodexNodes());
|
PeerConnectionTestHelpers.AssertFullyConnected(GetAllOnlineCodexNodes());
|
||||||
|
PeerDownloadTestHelpers.AssertFullDownloadInterconnectivity(GetAllOnlineCodexNodes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue