2023-06-04 08:59:51 +02:00
|
|
|
|
using DistTestCore;
|
|
|
|
|
using NUnit.Framework;
|
2023-09-08 09:39:56 +02:00
|
|
|
|
using Utils;
|
2023-06-04 08:59:51 +02:00
|
|
|
|
|
|
|
|
|
namespace Tests.DownloadConnectivityTests
|
|
|
|
|
{
|
|
|
|
|
[TestFixture]
|
|
|
|
|
public class FullyConnectedDownloadTests : AutoBootstrapDistTest
|
|
|
|
|
{
|
2023-08-28 11:16:58 +02: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 16:10:30 +02:00
|
|
|
|
[Test]
|
|
|
|
|
[Combinatorial]
|
|
|
|
|
public void FullyConnectedDownloadTest(
|
2023-09-08 14:03:47 +02:00
|
|
|
|
[Values(3, 5)] int numberOfNodes,
|
|
|
|
|
[Values(10, 80)] int sizeMBs)
|
2023-06-04 08:59:51 +02:00
|
|
|
|
{
|
2023-08-24 15:32:08 +02:00
|
|
|
|
SetupCodexNodes(numberOfNodes);
|
2023-06-04 08:59:51 +02:00
|
|
|
|
|
2023-08-28 11:16:58 +02:00
|
|
|
|
AssertAllNodesConnected(sizeMBs);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private void AssertAllNodesConnected(int sizeMBs = 10)
|
|
|
|
|
{
|
2023-08-24 10:59:11 +02:00
|
|
|
|
CreatePeerDownloadTestHelpers().AssertFullDownloadInterconnectivity(GetAllOnlineCodexNodes(), sizeMBs.MB());
|
2023-06-04 08:59:51 +02:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|