From ab2522657f7c51233fb83824b9b47259801ddbe3 Mon Sep 17 00:00:00 2001 From: dimgigov Date: Wed, 13 May 2026 13:22:06 +0300 Subject: [PATCH] debug(ci): add lock/lsm test to isolate failure --- .github/workflows/debug.yml | 3 +++ tests/test_lock.nim | 17 +++++++++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/test_lock.nim diff --git a/.github/workflows/debug.yml b/.github/workflows/debug.yml index ab53e4d..edc8a55 100644 --- a/.github/workflows/debug.yml +++ b/.github/workflows/debug.yml @@ -27,6 +27,9 @@ jobs: nim --version echo "NIM_OK=1" + - name: Compile and run lock test + run: nim c --threads:on --path:src -r tests/test_lock.nim + - name: Run join_tests run: timeout 30 nim c -d:ssl --threads:on --path:src -r tests/join_tests.nim diff --git a/tests/test_lock.nim b/tests/test_lock.nim new file mode 100644 index 0000000..8e4cbbd --- /dev/null +++ b/tests/test_lock.nim @@ -0,0 +1,17 @@ +import std/unittest +import std/locks +import barabadb/storage/lsm + +suite "Lock test": + test "initLock works": + var l: Lock + initLock(l) + acquire(l) + release(l) + check true + + test "newLSMTree works": + var db = newLSMTree("/tmp/test_lock_lsm") + check db != nil + db.put("key1", @[1'u8, 2'u8]) + check true