mirror of
https://github.com/logos-storage/logos-storage-nim-cs-dist-tests.git
synced 2026-01-03 22:13:10 +00:00
This is working
This commit is contained in:
parent
64d271c809
commit
44d14e589a
@ -146,7 +146,6 @@ namespace CodexContractsPlugin
|
||||
|
||||
public void WaitUntilNextPeriod()
|
||||
{
|
||||
log.Log("Waiting until next proof period...");
|
||||
var now = DateTimeOffset.UtcNow.ToUnixTimeSeconds();
|
||||
var periodSeconds = (int)Deployment.Config.Proofs.Period;
|
||||
var secondsLeft = now % periodSeconds;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -2,7 +2,7 @@
|
||||
{
|
||||
public class CodexDockerImage
|
||||
{
|
||||
private const string DefaultDockerImage = "codexstorage/nim-codex:0.2.3-dist-tests";
|
||||
private const string DefaultDockerImage = "codexstorage/nim-codex:sha-2e1306a-dist-tests";
|
||||
|
||||
public static string Override { get; set; } = string.Empty;
|
||||
|
||||
|
||||
@ -8,11 +8,16 @@ namespace CodexReleaseTests.MarketTests
|
||||
public class FailTest : MarketplaceAutoBootstrapDistTest
|
||||
{
|
||||
protected override int NumberOfHosts => 4;
|
||||
private readonly int SlotTolerance;
|
||||
protected override int NumberOfClients => 1;
|
||||
protected override ByteSize HostAvailabilitySize => 1.GB();
|
||||
protected override TimeSpan HostAvailabilityMaxDuration => TimeSpan.FromDays(1.0);
|
||||
|
||||
[Ignore("Slots are never freed because proofs are never marked as missing. Issue: https://github.com/codex-storage/nim-codex/issues/1153")]
|
||||
public FailTest()
|
||||
{
|
||||
SlotTolerance = NumberOfHosts / 2;
|
||||
}
|
||||
|
||||
[Test]
|
||||
[Combinatorial]
|
||||
public void Fail(
|
||||
@ -50,7 +55,8 @@ namespace CodexReleaseTests.MarketTests
|
||||
{
|
||||
var events = GetContracts().GetEvents(GetTestRunTimeRange());
|
||||
var slotFreed = events.GetSlotFreedEvents();
|
||||
if (slotFreed.Length == NumberOfHosts)
|
||||
Log($"SlotFreed events: {slotFreed.Length} - Expected: {SlotTolerance}");
|
||||
if (slotFreed.Length > SlotTolerance)
|
||||
{
|
||||
Log($"{nameof(WaitForSlotFreedEvents)} took {Time.FormatDuration(DateTime.UtcNow - start)}");
|
||||
return;
|
||||
@ -68,7 +74,7 @@ namespace CodexReleaseTests.MarketTests
|
||||
Duration = HostAvailabilityMaxDuration / 2,
|
||||
Expiry = TimeSpan.FromMinutes(5.0),
|
||||
MinRequiredNumberOfNodes = (uint)NumberOfHosts,
|
||||
NodeFailureTolerance = (uint)(NumberOfHosts / 2),
|
||||
NodeFailureTolerance = (uint)SlotTolerance,
|
||||
PricePerBytePerSecond = 100.TstWei(),
|
||||
ProofProbability = 1, // Require a proof every period
|
||||
CollateralPerByte = 1.TstWei()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user