Implement unit tests for RocksDbSharp nice APIs#68
Implement unit tests for RocksDbSharp nice APIs#68theolivenbaum wants to merge 4 commits intomasterfrom
Conversation
Co-authored-by: theolivenbaum <[email protected]>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
…sive unit tests Co-authored-by: theolivenbaum <[email protected]>
…b downloader Co-authored-by: theolivenbaum <[email protected]>
theolivenbaum
left a comment
There was a problem hiding this comment.
Can you update all tests to use a different sub path using nameof of the test method?
RocksDb.Tests/RocksDbNiceApiTests.cs
Outdated
| private string _tempPath; | ||
|
|
||
| [AssemblyInitialize] | ||
| public static void AssemblyInit(TestContext context) |
There was a problem hiding this comment.
Can't this method be async to avoid the getawaiter call?
There was a problem hiding this comment.
Updated AssemblyInit to be async Task to properly await the download and extraction process.
RocksDb.Tests/RocksDbNiceApiTests.cs
Outdated
| string rid = null; | ||
| string libName = null; | ||
|
|
||
| if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) |
There was a problem hiding this comment.
Use the more modern methods for checking operating system
There was a problem hiding this comment.
Switched to using OperatingSystem.IsLinux(), OperatingSystem.IsWindows(), and OperatingSystem.IsMacOS().
RocksDb.Tests/RocksDbNiceApiTests.cs
Outdated
| return; | ||
| } | ||
|
|
||
| string version = "10.4.2.63147"; |
There was a problem hiding this comment.
Fetch latest version number from nuget instead
There was a problem hiding this comment.
Added GetLatestRocksDbVersion helper to dynamically fetch the latest version from the NuGet Registration API, with a fallback to the known working version.
… checks Co-authored-by: theolivenbaum <[email protected]>
Implemented a new unit test project
Tests/RocksDbNiceApiTests.csusing MSTest to cover the high-level C# APIs of RocksDbSharp.Changes:
Tests/Tests.csprojto targetnet8.0and ensured correct package references.Tests/Test.cs(console script) to resolve entry point conflicts.Tests/RocksDbNiceApiTests.cscovering:csharp/src/RocksDb.cswherecolumnFamiliesdictionary was not initialized ifRocksDbwas opened without column families, causingNullReferenceExceptionwhen creating a column family later.Note: The
librocksdb.soin the repository is a stub. For tests to run, the actual native library must be present in the output directory (e.g. downloaded from NuGet or built). The tests were verified by temporarily placing the native library in the bin folder.PR created automatically by Jules for task 4735523558132882593 started by @theolivenbaum