From ab42fa80041b5d5cf31430cc69cf475dd5a6bb6e Mon Sep 17 00:00:00 2001 From: benbierens Date: Mon, 7 Aug 2023 18:31:13 +0200 Subject: [PATCH] removes just-wait tests --- Tests/BasicTests/ContinuousSubstitute.cs | 58 +----------------------- 1 file changed, 1 insertion(+), 57 deletions(-) diff --git a/Tests/BasicTests/ContinuousSubstitute.cs b/Tests/BasicTests/ContinuousSubstitute.cs index 8911a27..e589df0 100644 --- a/Tests/BasicTests/ContinuousSubstitute.cs +++ b/Tests/BasicTests/ContinuousSubstitute.cs @@ -61,67 +61,11 @@ namespace Tests.BasicTests } } - [Test] - public void JustWaitFirst() - { - var nodes = new List(); - for (var i = 0; i < 5; i++) - { - nodes.Add((OnlineCodexNode)SetupCodexNode(o => o - .EnableMarketplace(100000.TestTokens(), 0.Eth(), isValidator: i < 2) - .WithStorageQuota(2.GB()) - )); - } - - var cts = new CancellationTokenSource(); - var ct = cts.Token; - var dlPath = Path.Combine(new FileInfo(Get().Log.LogFile.FullFilename)!.Directory!.FullName, "continuouslogsjustwait"); - Directory.CreateDirectory(dlPath); - - var containers = nodes.Select(n => n.CodexAccess.Container).ToArray(); - var cd = new ContinuousLogDownloader(Get(), containers, dlPath, ct); - - var logTask = Task.Run(cd.Run); - - try - { - foreach (var node in nodes) - { - node.Marketplace.MakeStorageAvailable( - size: 1.GB(), - minPricePerBytePerSecond: 1.TestTokens(), - maxCollateral: 1024.TestTokens(), - maxDuration: TimeSpan.FromMinutes(5)); - } - - Log("Waiting 30 minutes..."); - Thread.Sleep(TimeSpan.FromMinutes(30)); - - var endTime = DateTime.UtcNow + TimeSpan.FromHours(1); - while (DateTime.UtcNow < endTime) - { - var allNodes = nodes.ToList(); - var primary = allNodes.PickOneRandom(); - var secondary = allNodes.PickOneRandom(); - - Log("Run Test"); - PerformTest(primary, secondary); - - Thread.Sleep(TimeSpan.FromSeconds(30)); - } - } - finally - { - cts.Cancel(); - logTask.Wait(); - } - } - private void PerformTest(IOnlineCodexNode primary, IOnlineCodexNode secondary) { ScopedTestFiles(() => { - var testFile = GenerateTestFile(10.MB()); + var testFile = GenerateTestFile(1000.MB()); var contentId = primary.UploadFile(testFile);