From cc9f943f15d9e73b3296ca411ea629c9220bf6a0 Mon Sep 17 00:00:00 2001 From: PaulusParssinen Date: Wed, 24 Apr 2024 21:31:48 +0300 Subject: [PATCH] Quick path fix to get test pass * Investigate whether I need to "fix" RID usage in this PR too --- test/Garnet.test/GarnetServerConfigTests.cs | 2 +- test/Garnet.test/RespCustomCommandTests.cs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/Garnet.test/GarnetServerConfigTests.cs b/test/Garnet.test/GarnetServerConfigTests.cs index 8e813453d9..c4548e78b6 100644 --- a/test/Garnet.test/GarnetServerConfigTests.cs +++ b/test/Garnet.test/GarnetServerConfigTests.cs @@ -79,7 +79,7 @@ public void ImportExportConfigLocal() // No import path, include command line args, export to file // Check values from command line override values from defaults.conf - var args = new string[] { "--config-export-path", configPath, "-p", "4m", "-m", "8g", "-s", "2g", "--recover", "--port", "53", "--reviv-obj-bin-record-count", "2", "--reviv-fraction", "0.5", "--extension-bin-paths", "../../../../../../test/Garnet.test,../../../../../../test/Garnet.test.cluster" }; + var args = new string[] { "--config-export-path", configPath, "-p", "4m", "-m", "8g", "-s", "2g", "--recover", "--port", "53", "--reviv-obj-bin-record-count", "2", "--reviv-fraction", "0.5", "--extension-bin-paths", "../../../../../test/Garnet.test,../../../../../test/Garnet.test.cluster" }; parseSuccessful = ServerSettingsManager.TryParseCommandLineArguments(args, out options, out invalidOptions); Assert.IsTrue(parseSuccessful); Assert.AreEqual(invalidOptions.Count, 0); diff --git a/test/Garnet.test/RespCustomCommandTests.cs b/test/Garnet.test/RespCustomCommandTests.cs index 5a32c363d2..7081ed3ae1 100644 --- a/test/Garnet.test/RespCustomCommandTests.cs +++ b/test/Garnet.test/RespCustomCommandTests.cs @@ -518,7 +518,7 @@ public static void CreateTestLibrary(string[] namespaces, string[] referenceFile foreach (var fileToCompile in filesToCompile) { - Assert.IsTrue(File.Exists(fileToCompile)); + Assert.IsTrue(File.Exists(fileToCompile), $"File at '{fileToCompile}' does not exist."); } var parseFunc = new Func(filePath => @@ -605,11 +605,11 @@ private string[] CreateTestLibraries() var libPathToFiles = new Dictionary { - { Path.Combine(dir1, "testLib1.dll"), new [] {@"../../../../../../main/GarnetServer/Extensions/MyDictObject.cs"}}, - { Path.Combine(dir2, "testLib2.dll"), new [] {@"../../../../../../main/GarnetServer/Extensions/SetIfPM.cs"}}, + { Path.Combine(dir1, "testLib1.dll"), new [] {@"../../../../../main/GarnetServer/Extensions/MyDictObject.cs"}}, + { Path.Combine(dir2, "testLib2.dll"), new [] {@"../../../../../main/GarnetServer/Extensions/SetIfPM.cs"}}, { Path.Combine(dir2, "testLib3.dll"), new [] { - @"../../../../../../main/GarnetServer/Extensions/ReadWriteTxn.cs", + @"../../../../../main/GarnetServer/Extensions/ReadWriteTxn.cs", testFilePath, }} };