27 lines
748 B
C#
Raw Normal View History

2025-01-29 14:44:19 +01:00
using CodexTests;
using NUnit.Framework;
2024-10-11 10:30:07 +02:00
using Utils;
2025-01-29 14:44:19 +01:00
namespace ExperimentalTests.DownloadConnectivityTests
2024-10-11 10:30:07 +02:00
{
[TestFixture]
2024-11-21 10:46:11 +01:00
public class DetectBlockRetransmitTest : AutoBootstrapDistTest
2024-10-11 10:30:07 +02:00
{
[Test]
2024-10-11 11:20:59 +02:00
[Combinatorial]
2024-10-11 10:30:07 +02:00
[CreateTranscript("swarm_retransmit")]
2024-10-11 11:20:59 +02:00
public void DetectBlockRetransmits(
[Values(1, 5, 10, 20)] int fileSize,
[Values(3, 5, 10, 20)] int numNodes
)
2024-10-11 10:30:07 +02:00
{
2024-10-11 11:20:59 +02:00
var nodes = StartCodex(numNodes);
var file = GenerateTestFile(fileSize.MB());
2024-10-11 10:30:07 +02:00
var cid = nodes[0].UploadFile(file);
var tasks = nodes.Select(n => Task.Run(() => n.DownloadContent(cid))).ToArray();
Task.WaitAll(tasks);
}
}
}