From 5b132bcb546f0f8c1125d1b52947bb0a64217c94 Mon Sep 17 00:00:00 2001 From: benbierens Date: Wed, 19 Apr 2023 11:23:11 +0200 Subject: [PATCH] Fixes connection from codex node to its companion --- DistTestCore/Marketplace/GethContainerRecipe.cs | 2 +- Tests/BasicTests/ExampleTests.cs | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/DistTestCore/Marketplace/GethContainerRecipe.cs b/DistTestCore/Marketplace/GethContainerRecipe.cs index 0c0ca91..5067cf7 100644 --- a/DistTestCore/Marketplace/GethContainerRecipe.cs +++ b/DistTestCore/Marketplace/GethContainerRecipe.cs @@ -43,7 +43,7 @@ namespace DistTestCore.Marketplace var bootPort = config.BootstrapNode.DiscoveryPort.Number; var bootstrapArg = $"--bootnodes enode://{bootPubKey}@{bootIp}:{bootPort}"; - return $"--port {port.Number} --discovery.port {discovery.Number} --authrpc.port {authRpc.Number} --http.port {httpPort.Number} --ws --ws.port {wsPort.Number} --nodiscover {bootstrapArg}"; + return $"--port {port.Number} --discovery.port {discovery.Number} --authrpc.port {authRpc.Number} --http.port {httpPort.Number} --ws --ws.addr 0.0.0.0 --ws.port {wsPort.Number} --nodiscover {bootstrapArg}"; } } } diff --git a/Tests/BasicTests/ExampleTests.cs b/Tests/BasicTests/ExampleTests.cs index dc86bfa..31cc56a 100644 --- a/Tests/BasicTests/ExampleTests.cs +++ b/Tests/BasicTests/ExampleTests.cs @@ -51,7 +51,7 @@ namespace Tests.BasicTests public void MarketplaceExample() { var primary = SetupCodexNodes(1) - .WithStorageQuota(10.GB()) + .WithStorageQuota(11.GB()) .EnableMarketplace(initialBalance: 234.TestTokens()) .BringOnline()[0]; @@ -79,13 +79,14 @@ namespace Tests.BasicTests proofProbability: 5, duration: TimeSpan.FromMinutes(2)); - Time.Sleep(TimeSpan.FromMinutes(3)); + Time.Sleep(TimeSpan.FromMinutes(1)); - primary.Marketplace.AssertThatBalance(Is.LessThan(20), "Collateral was not placed."); - var primaryBalance = primary.Marketplace.GetBalance(); + primary.Marketplace.AssertThatBalance(Is.LessThan(234.TestTokens()), "Collateral was not placed."); - secondary.Marketplace.AssertThatBalance(Is.LessThan(1000), "Contractor was not charged for storage."); - primary.Marketplace.AssertThatBalance(Is.GreaterThan(primaryBalance), "Storer was not paid for storage."); + Time.Sleep(TimeSpan.FromMinutes(2)); + + primary.Marketplace.AssertThatBalance(Is.GreaterThan(234.TestTokens()), "Storer was not paid for storage."); + secondary.Marketplace.AssertThatBalance(Is.LessThan(1000.TestTokens()), "Contractor was not charged for storage."); } } }