diff --git a/ContinuousTests/Tests/HoldMyBeerTest.cs b/ContinuousTests/Tests/HoldMyBeerTest.cs index 18e72f15..f54b6588 100644 --- a/ContinuousTests/Tests/HoldMyBeerTest.cs +++ b/ContinuousTests/Tests/HoldMyBeerTest.cs @@ -15,17 +15,7 @@ namespace ContinuousTests.Tests [TestMoment(t: Zero)] public void UploadTestFile() { - var metadata = Configuration.CodexDeployment.Metadata; - var maxQuotaUseMb = metadata.StorageQuotaMB / 2; - var safeTTL = Math.Max(metadata.BlockTTL, metadata.BlockMI) + 30; - var runsPerTtl = Convert.ToInt32(safeTTL / RunTestEvery.TotalSeconds); - var filesizePerUploadMb = Math.Min(80, maxQuotaUseMb / runsPerTtl); - // This filesize should keep the quota below 50% of the node's max. - - var filesize = filesizePerUploadMb.MB(); - double codexDefaultBlockSize = 31 * 64 * 33; - var numberOfBlocks = Convert.ToInt64(Math.Ceiling(filesize.SizeInBytes / codexDefaultBlockSize)); - Assert.That(numberOfBlocks, Is.EqualTo(1282)); + var filesize = 80.MB(); file = FileManager.GenerateTestFile(filesize); diff --git a/Tests/BasicTests/ContinuousSubstitute.cs b/Tests/BasicTests/ContinuousSubstitute.cs index 80f77f9e..0f4570a5 100644 --- a/Tests/BasicTests/ContinuousSubstitute.cs +++ b/Tests/BasicTests/ContinuousSubstitute.cs @@ -4,6 +4,7 @@ using Utils; namespace Tests.BasicTests { + [Ignore("Used for debugging continuous tests")] [TestFixture] public class ContinuousSubstitute : AutoBootstrapDistTest { @@ -60,16 +61,22 @@ namespace Tests.BasicTests var checkTime = DateTime.UtcNow + TimeSpan.FromMinutes(1); var endTime = DateTime.UtcNow + TimeSpan.FromHours(10); + var uploadInterval = 0; while (DateTime.UtcNow < endTime) { CreatePeerConnectionTestHelpers().AssertFullyConnected(GetAllOnlineCodexNodes()); + CheckRoutingTables(GetAllOnlineCodexNodes()); - if (DateTime.UtcNow > checkTime) + if (uploadInterval == 0) { - CheckRoutingTables(GetAllOnlineCodexNodes()); + uploadInterval = 2; + var node = RandomUtils.PickOneRandom(nodes.ToList()); + var file = GenerateTestFile(50.MB()); + node.UploadFile(file); } + else uploadInterval--; - Thread.Sleep(5000); + Thread.Sleep(30000); } }