2023-06-04 06:59:51 +00:00
|
|
|
|
using DistTestCore;
|
|
|
|
|
using NUnit.Framework;
|
2023-09-08 07:39:56 +00:00
|
|
|
|
using Utils;
|
2023-06-04 06:59:51 +00:00
|
|
|
|
|
|
|
|
|
namespace Tests.DownloadConnectivityTests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class FullyConnectedDownloadTests : AutoBootstrapDistTest
|
|
|
|
|
{
|
2023-08-28 09:16:58 +00:00
|
|
|
|
[Test]
|
|
|
|
|
public void MetricsDoesNotInterfereWithPeerDownload()
|
|
|
|
|
{
|
|
|
|
|
SetupCodexNodes(2, s => s.EnableMetrics());
|
|
|
|
|
|
|
|
|
|
AssertAllNodesConnected();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
[Test]
|
|
|
|
|
public void MarketplaceDoesNotInterfereWithPeerDownload()
|
|
|
|
|
{
|
|
|
|
|
SetupCodexNodes(2, s => s.EnableMetrics().EnableMarketplace(1000.TestTokens()));
|
|
|
|
|
|
|
|
|
|
AssertAllNodesConnected();
|
|
|
|
|
}
|
|
|
|
|
|
2023-06-06 14:10:30 +00:00
|
|
|
|
[Test]
|
|
|
|
|
[Combinatorial]
|
|
|
|
|
public void FullyConnectedDownloadTest(
|
2023-09-08 12:03:47 +00:00
|
|
|
|
[Values(3, 5)] int numberOfNodes,
|
|
|
|
|
[Values(10, 80)] int sizeMBs)
|
2023-06-04 06:59:51 +00:00
|
|
|
|
{
|
2023-08-24 13:32:08 +00:00
|
|
|
|
SetupCodexNodes(numberOfNodes);
|
2023-06-04 06:59:51 +00:00
|
|
|
|
|
2023-08-28 09:16:58 +00:00
|
|
|
|
AssertAllNodesConnected(sizeMBs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AssertAllNodesConnected(int sizeMBs = 10)
|
|
|
|
|
{
|
2023-08-24 08:59:11 +00:00
|
|
|
|
CreatePeerDownloadTestHelpers().AssertFullDownloadInterconnectivity(GetAllOnlineCodexNodes(), sizeMBs.MB());
|
2023-06-04 06:59:51 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|