Sets quota for codex nodes. Sets loglevel for bootstrap node.
This commit is contained in:
parent
23ebd4166b
commit
700fc0ea40
|
@ -2,6 +2,7 @@
|
||||||
{
|
{
|
||||||
public class NumberSource
|
public class NumberSource
|
||||||
{
|
{
|
||||||
|
private readonly object @lock = new object();
|
||||||
private int number;
|
private int number;
|
||||||
|
|
||||||
public NumberSource(int start)
|
public NumberSource(int start)
|
||||||
|
@ -11,8 +12,12 @@
|
||||||
|
|
||||||
public int GetNextNumber()
|
public int GetNextNumber()
|
||||||
{
|
{
|
||||||
var n = number;
|
var n = -1;
|
||||||
number++;
|
lock (@lock)
|
||||||
|
{
|
||||||
|
n = number;
|
||||||
|
number++;
|
||||||
|
}
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,9 +23,14 @@ public class ScalabilityTests : CodexDistTest
|
||||||
{
|
{
|
||||||
CodexContainerRecipe.DockerImageOverride = usePatchedImage ? PatchedImage : MasterImage;
|
CodexContainerRecipe.DockerImageOverride = usePatchedImage ? PatchedImage : MasterImage;
|
||||||
|
|
||||||
var bootstrap = AddCodex();
|
var logLevel = CodexLogLevel.Info;
|
||||||
var nodes = AddCodex(numberOfNodes - 1,
|
|
||||||
s => s.WithBootstrapNode(bootstrap).WithLogLevel(CodexLogLevel.Info)).ToList();
|
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 uploader = nodes.PickOneRandom();
|
||||||
var downloader = nodes.PickOneRandom();
|
var downloader = nodes.PickOneRandom();
|
||||||
|
@ -43,4 +48,4 @@ public class ScalabilityTests : CodexDistTest
|
||||||
|
|
||||||
downloadedFile!.AssertIsEqual(testFile);
|
downloadedFile!.AssertIsEqual(testFile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue