2
0
mirror of synced 2025-01-13 01:54:07 +00:00

combinatorial swarm tests

This commit is contained in:
benbierens 2024-10-11 11:20:59 +02:00
parent 5896735884
commit 1bd84a4892
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A

View File

@ -7,11 +7,15 @@ namespace CodexTests.DownloadConnectivityTests
public class SwarmTests : AutoBootstrapDistTest public class SwarmTests : AutoBootstrapDistTest
{ {
[Test] [Test]
[Combinatorial]
[CreateTranscript("swarm_retransmit")] [CreateTranscript("swarm_retransmit")]
public void DetectBlockRetransmits() public void DetectBlockRetransmits(
[Values(1, 5, 10, 20)] int fileSize,
[Values(3, 5, 10, 20)] int numNodes
)
{ {
var nodes = StartCodex(10); var nodes = StartCodex(numNodes);
var file = GenerateTestFile(10.MB()); var file = GenerateTestFile(fileSize.MB());
var cid = nodes[0].UploadFile(file); var cid = nodes[0].UploadFile(file);
var tasks = nodes.Select(n => Task.Run(() => n.DownloadContent(cid))).ToArray(); var tasks = nodes.Select(n => Task.Run(() => n.DownloadContent(cid))).ToArray();