Sets quota for codex nodes. Sets loglevel for bootstrap node.

This commit is contained in:
benbierens 2024-04-15 07:57:13 +02:00
parent 23ebd4166b
commit 700fc0ea40
No known key found for this signature in database
GPG Key ID: 877D2C2E09A22F3A
2 changed files with 16 additions and 6 deletions

View File

@ -2,6 +2,7 @@
{
public class NumberSource
{
private readonly object @lock = new object();
private int number;
public NumberSource(int start)
@ -11,8 +12,12 @@
public int GetNextNumber()
{
var n = number;
var n = -1;
lock (@lock)
{
n = number;
number++;
}
return n;
}
}

View File

@ -23,9 +23,14 @@ public class ScalabilityTests : CodexDistTest
{
CodexContainerRecipe.DockerImageOverride = usePatchedImage ? PatchedImage : MasterImage;
var bootstrap = AddCodex();
var nodes = AddCodex(numberOfNodes - 1,
s => s.WithBootstrapNode(bootstrap).WithLogLevel(CodexLogLevel.Info)).ToList();
var logLevel = CodexLogLevel.Info;
var bootstrap = AddCodex(s => s.WithLogLevel(logLevel));
var nodes = AddCodex(numberOfNodes - 1, s => s
.WithBootstrapNode(bootstrap)
.WithLogLevel(logLevel)
.WithStorageQuota((fileSizeInMb + 50).MB())
).ToList();
var uploader = nodes.PickOneRandom();
var downloader = nodes.PickOneRandom();