Simulated proof failure test now working

This commit is contained in:
Eric 2023-08-16 17:21:54 +10:00
parent 83d907152a
commit 255dc127c8
No known key found for this signature in database
2 changed files with 9 additions and 9 deletions

View File

@ -5,7 +5,7 @@ namespace DistTestCore.Codex
{
public class CodexContainerRecipe : ContainerRecipeFactory
{
public const string DockerImage = "codexstorage/nim-codex:sha-5141d85";
public const string DefaultDockerImage = "codexstorage/nim-codex:sha-5141d85";
public const string MetricsPortTag = "metrics_port";
public const string DiscoveryPortTag = "discovery-port";

View File

@ -15,21 +15,21 @@ namespace Tests.BasicTests
var buyerInitialBalance = 1000.TestTokens();
var seller = SetupCodexNode(s => s
.WithLogLevel(CodexLogLevel.Trace, "market", "sales", "proving")
.WithLogLevel(CodexLogLevel.Trace, "marketplace", "sales", "proving", "reservations")
.WithStorageQuota(11.GB())
.EnableMarketplace(sellerInitialBalance)
.WithName("seller"));
var sellerWithFailures = SetupCodexNode(s => s
.WithLogLevel(CodexLogLevel.Trace, "market", "sales", "proving")
.WithLogLevel(CodexLogLevel.Trace, "marketplace", "sales", "proving", "reservations")
.WithStorageQuota(11.GB())
.WithBootstrapNode(seller)
.WithSimulateProofFailures(3)
.WithSimulateProofFailures(2)
.EnableMarketplace(sellerInitialBalance)
.WithName("seller with failures"));
var buyer = SetupCodexNode(s => s
.WithLogLevel(CodexLogLevel.Trace, "market", "purchasing", "node", "restapi")
.WithLogLevel(CodexLogLevel.Trace, "marketplace", "purchasing", "node", "restapi")
.WithBootstrapNode(seller)
.EnableMarketplace(buyerInitialBalance)
.WithName("buyer"));
@ -49,13 +49,13 @@ namespace Tests.BasicTests
size: 10.GB(),
minPricePerBytePerSecond: 1.TestTokens(),
maxCollateral: 20.TestTokens(),
maxDuration: TimeSpan.FromMinutes(3));
maxDuration: TimeSpan.FromMinutes(5));
sellerWithFailures.Marketplace.MakeStorageAvailable(
size: 10.GB(),
minPricePerBytePerSecond: 1.TestTokens(),
maxCollateral: 20.TestTokens(),
maxDuration: TimeSpan.FromMinutes(3));
maxDuration: TimeSpan.FromMinutes(5));
var testFile = GenerateTestFile(10.MB());
var contentId = buyer.UploadFile(testFile);
@ -64,8 +64,8 @@ namespace Tests.BasicTests
pricePerSlotPerSecond: 2.TestTokens(),
requiredCollateral: 10.TestTokens(),
minRequiredNumberOfNodes: 2,
proofProbability: 5,
duration: TimeSpan.FromMinutes(2));
proofProbability: 2,
duration: TimeSpan.FromMinutes(4));
// Time.Sleep(TimeSpan.FromMinutes(1));