diff --git a/Tests/CodexTests/BasicTests/OneClientTests.cs b/Tests/CodexTests/BasicTests/OneClientTests.cs index ef8c18b..27c855a 100644 --- a/Tests/CodexTests/BasicTests/OneClientTests.cs +++ b/Tests/CodexTests/BasicTests/OneClientTests.cs @@ -22,19 +22,16 @@ namespace CodexTests.BasicTests [Test] public void InterruptUploadTest() { - var tasks = new List>(); - for (var i = 0; i < 10; i++) - { - tasks.Add(Task.Run(() => RunInterruptUploadTest())); - } + var nodes = StartCodex(10); + + var tasks = nodes.Select(n => Task.Run(() => RunInterruptUploadTest(n))); Task.WaitAll(tasks.ToArray()); Assert.That(tasks.Select(t => t.Result).All(r => r == true)); } - private bool RunInterruptUploadTest() + private bool RunInterruptUploadTest(ICodexNode node) { - var node = StartCodex(); var file = GenerateTestFile(300.MB()); var process = StartCurlUploadProcess(node, file);