set up swarm test

This commit is contained in:
benbierens 2024-10-11 10:30:07 +02:00
parent bebeb3766e
commit 5896735884
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
1 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,21 @@
using NUnit.Framework;
using Utils;
namespace CodexTests.DownloadConnectivityTests
{
[TestFixture]
public class SwarmTests : AutoBootstrapDistTest
{
[Test]
[CreateTranscript("swarm_retransmit")]
public void DetectBlockRetransmits()
{
var nodes = StartCodex(10);
var file = GenerateTestFile(10.MB());
var cid = nodes[0].UploadFile(file);
var tasks = nodes.Select(n => Task.Run(() => n.DownloadContent(cid))).ToArray();
Task.WaitAll(tasks);
}
}
}