2026-04-17 15:03:22 +10:00
|
|
|
|
using LogosStorageClient;
|
|
|
|
|
|
using LogosStorageTests;
|
|
|
|
|
|
using LogosStorageTests.Helpers;
|
2024-11-21 14:34:13 +01:00
|
|
|
|
using NUnit.Framework;
|
2024-11-21 10:03:09 +01:00
|
|
|
|
|
2026-04-17 15:03:22 +10:00
|
|
|
|
namespace LogosStorageReleaseTests.NodeTests
|
2024-11-21 10:03:09 +01:00
|
|
|
|
{
|
2024-11-21 14:34:13 +01:00
|
|
|
|
[TestFixture]
|
|
|
|
|
|
public class PeerTableTests : AutoBootstrapDistTest
|
2024-11-21 10:03:09 +01:00
|
|
|
|
{
|
2024-11-21 14:34:13 +01:00
|
|
|
|
[Test]
|
|
|
|
|
|
public void PeerTableCompleteness()
|
|
|
|
|
|
{
|
2026-04-17 15:03:22 +10:00
|
|
|
|
var nodes = StartLogosStorage(10);
|
2024-11-21 14:34:13 +01:00
|
|
|
|
|
2024-12-02 10:34:09 +01:00
|
|
|
|
AssertAllNodesSeeEachOther(nodes.Concat([BootstrapNode!]));
|
2024-11-21 14:34:13 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2026-04-17 15:03:22 +10:00
|
|
|
|
private void AssertAllNodesSeeEachOther(IEnumerable<IStorageNode> nodes)
|
2024-11-21 14:34:13 +01:00
|
|
|
|
{
|
2024-12-02 10:34:09 +01:00
|
|
|
|
var helper = new PeerConnectionTestHelpers(GetTestLog());
|
|
|
|
|
|
helper.AssertFullyConnected(nodes);
|
2024-11-21 14:34:13 +01:00
|
|
|
|
}
|
2024-11-21 10:03:09 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|