debugging local

This commit is contained in:
benbierens 2023-09-01 10:39:41 +02:00
parent a26d38b749
commit 3df4a97bba
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
2 changed files with 11 additions and 14 deletions

View File

@ -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);

View File

@ -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);
}
}