mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-02-25 07:23:28 +00:00
debugging local
This commit is contained in:
parent
a26d38b749
commit
3df4a97bba
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user