Hooks up block maintenance interval config param.
This commit is contained in:
parent
6e5e30afd4
commit
c0b7d3a747
|
@ -51,6 +51,10 @@ namespace DistTestCore.Codex
|
|||
{
|
||||
AddEnvVar("CODEX_BLOCK_TTL", config.BlockTTL.ToString()!);
|
||||
}
|
||||
if (config.BlockMaintenanceInterval != null)
|
||||
{
|
||||
AddEnvVar("CODEX_BLOCK_MI", Convert.ToInt32(config.BlockMaintenanceInterval.Value.TotalSeconds).ToString());
|
||||
}
|
||||
if (config.MetricsMode != Metrics.MetricsMode.None)
|
||||
{
|
||||
AddEnvVar("CODEX_METRICS", "true");
|
||||
|
|
|
@ -19,5 +19,6 @@ namespace DistTestCore.Codex
|
|||
public MarketplaceInitialConfig? MarketplaceConfig { get; set; }
|
||||
public string? BootstrapSpr { get; set; }
|
||||
public int? BlockTTL { get; set; }
|
||||
public TimeSpan? BlockMaintenanceInterval { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ namespace DistTestCore
|
|||
ICodexSetup WithBootstrapNode(IOnlineCodexNode node);
|
||||
ICodexSetup WithStorageQuota(ByteSize storageQuota);
|
||||
ICodexSetup WithBlockTTL(TimeSpan duration);
|
||||
ICodexSetup WithBlockMaintenanceInterval(TimeSpan duration);
|
||||
ICodexSetup EnableMetrics();
|
||||
ICodexSetup EnableMarketplace(TestToken initialBalance);
|
||||
ICodexSetup EnableMarketplace(TestToken initialBalance, Ether initialEther);
|
||||
|
@ -57,6 +58,12 @@ namespace DistTestCore
|
|||
return this;
|
||||
}
|
||||
|
||||
public ICodexSetup WithBlockMaintenanceInterval(TimeSpan duration)
|
||||
{
|
||||
BlockMaintenanceInterval = duration;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ICodexSetup EnableMetrics()
|
||||
{
|
||||
MetricsMode = Metrics.MetricsMode.Record;
|
||||
|
|
|
@ -15,6 +15,7 @@ namespace DistTestCore
|
|||
: base(lifecycle)
|
||||
{
|
||||
}
|
||||
|
||||
public GrafanaStartInfo StartDashboard(RunningContainer prometheusContainer, CodexSetup codexSetup)
|
||||
{
|
||||
LogStart($"Starting dashboard server");
|
||||
|
|
|
@ -67,6 +67,7 @@ namespace Tests.BasicTests
|
|||
.EnableMetrics()
|
||||
.EnableMarketplace(100000.TestTokens(), 0.Eth(), isValidator: true)
|
||||
.WithBlockTTL(TimeSpan.FromMinutes(2))
|
||||
.WithBlockMaintenanceInterval(TimeSpan.FromMinutes(3))
|
||||
.WithStorageQuota(3.GB()));
|
||||
|
||||
var nodes = group.Cast<OnlineCodexNode>().ToArray();
|
||||
|
|
Loading…
Reference in New Issue