This commit is contained in:
benbierens 2023-08-15 15:00:47 +02:00
parent 3abb1770c2
commit 57c46004b1
No known key found for this signature in database
GPG Key ID: FE44815D96D0A1AA
1 changed files with 16 additions and 29 deletions

View File

@ -64,39 +64,19 @@ namespace Tests.BasicTests
{
var group = SetupCodexNodes(5, o => o
.EnableMetrics()
//.EnableMarketplace(100000.TestTokens(), 0.Eth(), isValidator: true)
.WithBlockTTL(TimeSpan.FromMinutes(2))
.WithBlockMaintenanceInterval(TimeSpan.FromMinutes(5))
.WithBlockMaintenanceNumber(10000)
.WithStorageQuota(500.MB()));
.WithStorageQuota(1000.MB()));
var nodes = group.Cast<OnlineCodexNode>().ToArray();
//foreach (var node in nodes)
//{
// node.Marketplace.MakeStorageAvailable(
// size: 1.GB(),
// minPricePerBytePerSecond: 1.TestTokens(),
// maxCollateral: 1024.TestTokens(),
// maxDuration: TimeSpan.FromMinutes(5));
//}
//Thread.Sleep(2000);
//Log("calling crash...");
//var http = new Http(Get().Log, Get().TimeSet, nodes.First().CodexAccess.Address, baseUrl: "/api/codex/v1", nodes.First().CodexAccess.Container.Name);
//var str = http.HttpGetString("debug/crash");
//Log("crash called.");
//Thread.Sleep(TimeSpan.FromSeconds(60));
//Log("test done.");
var endTime = DateTime.UtcNow + TimeSpan.FromHours(2);
var endTime = DateTime.UtcNow + TimeSpan.FromHours(1);
while (DateTime.UtcNow < endTime)
{
foreach (var node in nodes)
{
try
{
var file = GenerateTestFile(80.MB());
var cid = node.UploadFile(file);
@ -104,8 +84,15 @@ namespace Tests.BasicTests
var dl = node.DownloadContent(cid);
file.AssertIsEqual(dl);
}
catch
{
Log("Test failed. Delaying shut-down by 30 seconds to collect metrics.");
Thread.Sleep(TimeSpan.FromSeconds(30));
throw;
}
}
Thread.Sleep(TimeSpan.FromSeconds(60));
Thread.Sleep(TimeSpan.FromSeconds(3));
}
}
}