diff --git a/ProjectPlugins/CodexPlugin/CodexExePath.cs b/ProjectPlugins/CodexPlugin/CodexExePath.cs index 2e4dc55..79e9d4d 100644 --- a/ProjectPlugins/CodexPlugin/CodexExePath.cs +++ b/ProjectPlugins/CodexPlugin/CodexExePath.cs @@ -2,17 +2,28 @@ { public class CodexExePath { - private readonly string path = Path.Combine( - "d:", - "Dev", - "nim-codex", - "build", - "codex.exe" - ); + private readonly string[] paths = [ + Path.Combine("d:", "Dev", "nim-codex", "build", "codex.exe"), + Path.Combine("c:", "Projects", "nim-codex", "build", "codex.exe") + ]; + + private string selectedPath = string.Empty; + + public CodexExePath() + { + foreach (var p in paths) + { + if (File.Exists(p)) + { + selectedPath = p; + return; + } + } + } public string Get() { - return path; + return selectedPath; } } } diff --git a/Tests/ExperimentalTests/BasicTests/AsyncProfiling.cs b/Tests/ExperimentalTests/BasicTests/AsyncProfiling.cs index 656ea9a..c74911f 100644 --- a/Tests/ExperimentalTests/BasicTests/AsyncProfiling.cs +++ b/Tests/ExperimentalTests/BasicTests/AsyncProfiling.cs @@ -1,8 +1,9 @@ using NUnit.Framework; using MetricsPlugin; using Utils; +using CodexTests; -namespace CodexTests.BasicTests +namespace ExperimentalTests.BasicTests { [TestFixture] public class AsyncProfiling : CodexDistTest diff --git a/Tests/ExperimentalTests/BasicTests/ExampleTests.cs b/Tests/ExperimentalTests/BasicTests/ExampleTests.cs index 716d3ff..b4ad44f 100644 --- a/Tests/ExperimentalTests/BasicTests/ExampleTests.cs +++ b/Tests/ExperimentalTests/BasicTests/ExampleTests.cs @@ -1,11 +1,12 @@ using CodexClient; using CodexPlugin; +using CodexTests; using DistTestCore; using MetricsPlugin; using NUnit.Framework; using Utils; -namespace CodexTests.BasicTests +namespace ExperimentalTests.BasicTests { [TestFixture] public class ExampleTests : CodexDistTest diff --git a/Tests/ExperimentalTests/BasicTests/MarketplaceTests.cs b/Tests/ExperimentalTests/BasicTests/MarketplaceTests.cs index 8cc596b..f8ef52d 100644 --- a/Tests/ExperimentalTests/BasicTests/MarketplaceTests.cs +++ b/Tests/ExperimentalTests/BasicTests/MarketplaceTests.cs @@ -2,12 +2,13 @@ using CodexContractsPlugin; using CodexContractsPlugin.Marketplace; using CodexPlugin; +using CodexTests; using FileUtils; using GethPlugin; using NUnit.Framework; using Utils; -namespace CodexTests.BasicTests +namespace ExperimentalTests.BasicTests { [TestFixture] public class MarketplaceTests : AutoBootstrapDistTest @@ -24,14 +25,14 @@ namespace CodexTests.BasicTests var hostInitialBalance = 234.TstWei(); var clientInitialBalance = 100000.TstWei(); var fileSize = new ByteSize( - numBlocks * (64 * 1024) + + numBlocks * 64 * 1024 + plusSizeKb * 1024 + plusSizeBytes ); var geth = StartGethNode(s => s.IsMiner().WithName("disttest-geth")); var contracts = Ci.StartCodexContracts(geth); - + var numberOfHosts = 5; var hosts = StartCodex(numberOfHosts, s => s .WithName("Host") @@ -81,7 +82,7 @@ namespace CodexTests.BasicTests }; var purchaseContract = client.Marketplace.RequestStorage(purchase); - + var contractCid = purchaseContract.ContentId; Assert.That(uploadCid.Id, Is.Not.EqualTo(contractCid.Id)); diff --git a/Tests/ExperimentalTests/BasicTests/PyramidTests.cs b/Tests/ExperimentalTests/BasicTests/PyramidTests.cs index 390a6c0..95d43e8 100644 --- a/Tests/ExperimentalTests/BasicTests/PyramidTests.cs +++ b/Tests/ExperimentalTests/BasicTests/PyramidTests.cs @@ -1,8 +1,9 @@ using CodexClient; +using CodexTests; using NUnit.Framework; using Utils; -namespace CodexTests.BasicTests +namespace ExperimentalTests.BasicTests { [TestFixture] public class PyramidTests : CodexDistTest @@ -46,7 +47,7 @@ namespace CodexTests.BasicTests var uploadTasks = new List>(); foreach (var node in layer) { - uploadTasks.Add(Task.Run(() => + uploadTasks.Add(Task.Run(() => { var file = GenerateTestFile(size); return node.UploadFile(file); diff --git a/Tests/ExperimentalTests/DownloadConnectivityTests/DatalayerReliabilityTests.cs b/Tests/ExperimentalTests/DownloadConnectivityTests/DatalayerReliabilityTests.cs index ea501e6..d218e6e 100644 --- a/Tests/ExperimentalTests/DownloadConnectivityTests/DatalayerReliabilityTests.cs +++ b/Tests/ExperimentalTests/DownloadConnectivityTests/DatalayerReliabilityTests.cs @@ -14,8 +14,8 @@ namespace ExperimentalTests.DownloadConnectivityTests [Test] [Combinatorial] public void SingleSetTest( - [Values(10, 100, 1000)] int fileSizeMb, - [Values(5, 10, 20, 30)] int numDownloaders + [Values(1000)] int fileSizeMb, + [Values(10, 20, 30)] int numDownloaders ) { var file = GenerateTestFile(fileSizeMb.MB()); diff --git a/Tests/ExperimentalTests/PeerDiscoveryTests/LayeredDiscoveryTests.cs b/Tests/ExperimentalTests/PeerDiscoveryTests/LayeredDiscoveryTests.cs index dc3d049..bf2ed0e 100644 --- a/Tests/ExperimentalTests/PeerDiscoveryTests/LayeredDiscoveryTests.cs +++ b/Tests/ExperimentalTests/PeerDiscoveryTests/LayeredDiscoveryTests.cs @@ -1,7 +1,8 @@ using CodexClient; +using CodexTests; using NUnit.Framework; -namespace CodexTests.PeerDiscoveryTests +namespace ExperimentalTests.PeerDiscoveryTests { [TestFixture] public class LayeredDiscoveryTests : CodexDistTest @@ -36,7 +37,7 @@ namespace CodexTests.PeerDiscoveryTests { var nodes = new List(); var node = StartCodex(); - nodes.Add(node); + nodes.Add(node); for (var i = 1; i < chainLength; i++) { diff --git a/Tests/ExperimentalTests/PeerDiscoveryTests/PeerDiscoveryTests.cs b/Tests/ExperimentalTests/PeerDiscoveryTests/PeerDiscoveryTests.cs index b0373a3..901504c 100644 --- a/Tests/ExperimentalTests/PeerDiscoveryTests/PeerDiscoveryTests.cs +++ b/Tests/ExperimentalTests/PeerDiscoveryTests/PeerDiscoveryTests.cs @@ -2,8 +2,9 @@ using CodexClient; using NUnit.Framework; using Utils; +using CodexTests; -namespace CodexTests.PeerDiscoveryTests +namespace ExperimentalTests.PeerDiscoveryTests { [TestFixture] public class PeerDiscoveryTests : AutoBootstrapDistTest diff --git a/Tests/ExperimentalTests/UtilityTests/ClusterSpeedTests.cs b/Tests/ExperimentalTests/UtilityTests/ClusterSpeedTests.cs index 7800e13..03bdb68 100644 --- a/Tests/ExperimentalTests/UtilityTests/ClusterSpeedTests.cs +++ b/Tests/ExperimentalTests/UtilityTests/ClusterSpeedTests.cs @@ -3,7 +3,7 @@ using Logging; using NUnit.Framework; using Utils; -namespace CodexTests.UtilityTests +namespace ExperimentalTests.UtilityTests { [TestFixture] public class ClusterDiscSpeedTests : DistTest diff --git a/Tests/ExperimentalTests/UtilityTests/DiscordBotTests.cs b/Tests/ExperimentalTests/UtilityTests/DiscordBotTests.cs index 008a7a1..abebac0 100644 --- a/Tests/ExperimentalTests/UtilityTests/DiscordBotTests.cs +++ b/Tests/ExperimentalTests/UtilityTests/DiscordBotTests.cs @@ -2,6 +2,7 @@ using CodexContractsPlugin; using CodexDiscordBotPlugin; using CodexPlugin; +using CodexTests; using Core; using DiscordRewards; using DistTestCore; @@ -12,7 +13,7 @@ using Newtonsoft.Json; using NUnit.Framework; using Utils; -namespace CodexTests.UtilityTests +namespace ExperimentalTests.UtilityTests { [TestFixture] public class DiscordBotTests : AutoBootstrapDistTest @@ -25,7 +26,7 @@ namespace CodexTests.UtilityTests private readonly List rewardsSeen = new List(); private readonly TimeSpan rewarderInterval = TimeSpan.FromMinutes(1); private readonly List receivedEvents = new List(); - + [Test] [DontDownloadLogs] [Ignore("Used to debug testnet bots.")] @@ -238,7 +239,7 @@ namespace CodexTests.UtilityTests if (h > minNumHosts) minNumHosts = h; } - var minFileSize = ((minSlotSize + 1024) * minNumHosts); + var minFileSize = (minSlotSize + 1024) * minNumHosts; return new ByteSize(Convert.ToInt64(minFileSize)); } diff --git a/Tests/ExperimentalTests/UtilityTests/LogHelperTests.cs b/Tests/ExperimentalTests/UtilityTests/LogHelperTests.cs index d6a1dfc..06f220e 100644 --- a/Tests/ExperimentalTests/UtilityTests/LogHelperTests.cs +++ b/Tests/ExperimentalTests/UtilityTests/LogHelperTests.cs @@ -1,8 +1,9 @@ using CodexClient; +using CodexTests; using NUnit.Framework; using Utils; -namespace CodexTests.UtilityTests +namespace ExperimentalTests.UtilityTests { [TestFixture] public class LogHelperTests : AutoBootstrapDistTest diff --git a/Tests/ExperimentalTests/UtilityTests/NetworkIsolationTest.cs b/Tests/ExperimentalTests/UtilityTests/NetworkIsolationTest.cs index a86f626..ea16dbb 100644 --- a/Tests/ExperimentalTests/UtilityTests/NetworkIsolationTest.cs +++ b/Tests/ExperimentalTests/UtilityTests/NetworkIsolationTest.cs @@ -4,7 +4,7 @@ using DistTestCore; using NUnit.Framework; using Utils; -namespace CodexTests.UtilityTests +namespace ExperimentalTests.UtilityTests { // Warning! // This is a test to check network-isolation in the test-infrastructure.