From 5896735884995e6312c828370a2cdb8d2251176e Mon Sep 17 00:00:00 2001 From: benbierens Date: Fri, 11 Oct 2024 10:30:07 +0200 Subject: [PATCH] set up swarm test --- .../DownloadConnectivityTests/SwarmTests.cs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Tests/CodexTests/DownloadConnectivityTests/SwarmTests.cs diff --git a/Tests/CodexTests/DownloadConnectivityTests/SwarmTests.cs b/Tests/CodexTests/DownloadConnectivityTests/SwarmTests.cs new file mode 100644 index 0000000..e531d7f --- /dev/null +++ b/Tests/CodexTests/DownloadConnectivityTests/SwarmTests.cs @@ -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); + } + } +}