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()!);
|
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)
|
if (config.MetricsMode != Metrics.MetricsMode.None)
|
||||||
{
|
{
|
||||||
AddEnvVar("CODEX_METRICS", "true");
|
AddEnvVar("CODEX_METRICS", "true");
|
||||||
|
@ -19,5 +19,6 @@ namespace DistTestCore.Codex
|
|||||||
public MarketplaceInitialConfig? MarketplaceConfig { get; set; }
|
public MarketplaceInitialConfig? MarketplaceConfig { get; set; }
|
||||||
public string? BootstrapSpr { get; set; }
|
public string? BootstrapSpr { get; set; }
|
||||||
public int? BlockTTL { get; set; }
|
public int? BlockTTL { get; set; }
|
||||||
|
public TimeSpan? BlockMaintenanceInterval { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,6 +11,7 @@ namespace DistTestCore
|
|||||||
ICodexSetup WithBootstrapNode(IOnlineCodexNode node);
|
ICodexSetup WithBootstrapNode(IOnlineCodexNode node);
|
||||||
ICodexSetup WithStorageQuota(ByteSize storageQuota);
|
ICodexSetup WithStorageQuota(ByteSize storageQuota);
|
||||||
ICodexSetup WithBlockTTL(TimeSpan duration);
|
ICodexSetup WithBlockTTL(TimeSpan duration);
|
||||||
|
ICodexSetup WithBlockMaintenanceInterval(TimeSpan duration);
|
||||||
ICodexSetup EnableMetrics();
|
ICodexSetup EnableMetrics();
|
||||||
ICodexSetup EnableMarketplace(TestToken initialBalance);
|
ICodexSetup EnableMarketplace(TestToken initialBalance);
|
||||||
ICodexSetup EnableMarketplace(TestToken initialBalance, Ether initialEther);
|
ICodexSetup EnableMarketplace(TestToken initialBalance, Ether initialEther);
|
||||||
@ -57,6 +58,12 @@ namespace DistTestCore
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ICodexSetup WithBlockMaintenanceInterval(TimeSpan duration)
|
||||||
|
{
|
||||||
|
BlockMaintenanceInterval = duration;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
public ICodexSetup EnableMetrics()
|
public ICodexSetup EnableMetrics()
|
||||||
{
|
{
|
||||||
MetricsMode = Metrics.MetricsMode.Record;
|
MetricsMode = Metrics.MetricsMode.Record;
|
||||||
|
@ -15,6 +15,7 @@ namespace DistTestCore
|
|||||||
: base(lifecycle)
|
: base(lifecycle)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
public GrafanaStartInfo StartDashboard(RunningContainer prometheusContainer, CodexSetup codexSetup)
|
public GrafanaStartInfo StartDashboard(RunningContainer prometheusContainer, CodexSetup codexSetup)
|
||||||
{
|
{
|
||||||
LogStart($"Starting dashboard server");
|
LogStart($"Starting dashboard server");
|
||||||
|
@ -67,6 +67,7 @@ namespace Tests.BasicTests
|
|||||||
.EnableMetrics()
|
.EnableMetrics()
|
||||||
.EnableMarketplace(100000.TestTokens(), 0.Eth(), isValidator: true)
|
.EnableMarketplace(100000.TestTokens(), 0.Eth(), isValidator: true)
|
||||||
.WithBlockTTL(TimeSpan.FromMinutes(2))
|
.WithBlockTTL(TimeSpan.FromMinutes(2))
|
||||||
|
.WithBlockMaintenanceInterval(TimeSpan.FromMinutes(3))
|
||||||
.WithStorageQuota(3.GB()));
|
.WithStorageQuota(3.GB()));
|
||||||
|
|
||||||
var nodes = group.Cast<OnlineCodexNode>().ToArray();
|
var nodes = group.Cast<OnlineCodexNode>().ToArray();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user