Commit39b60315Recorded24 Oct 2026Repositoryfolio
Fix lock-holder fixture environment under the Sigil VM
Changed
test/fixtures/hold-store-lock.sgl | 7 +++----
test/test-http-concurrency.mjs | 6 ++++--
2 files changed, 7 insertions(+), 6 deletions(-)Diff
test/fixtures/hold-store-lock.sglmodified
@@ -5,10 +5,9 @@
5
(folio store) 6
(folio lock)) 7
−8
(let* ((args (cdr (command-line)))−9
(store (make-folio-store (car args)))−10
(ready (cadr args))−11
(release (caddr args)))+8
(let* ((store (make-folio-store (getenv "FOLIO_LOCK_TEST_ROOT")))+9
(ready (getenv "FOLIO_LOCK_TEST_READY"))+10
(release (getenv "FOLIO_LOCK_TEST_RELEASE"))) 11
(call-with-store-lock store 12
(lambda () 13
(write-file-string ready "held\n")test/test-http-concurrency.mjsmodified
@@ -83,8 +83,10 @@ test('a read completes while a writer is waiting for another process', { timeout
83
assert.match(await call('folio/note-read', { name: 'fast' }), /committed before the writer/); 84
85
const ready = join(root, 'ready');−86
holder = spawn('sigil', ['-L', lib, resolve('test/fixtures/hold-store-lock.sgl'), root, ready, release], {−87
cwd: process.cwd(), env: process.env, stdio: ['ignore', 'pipe', 'pipe'],+86
holder = spawn('sigil', ['-L', lib, resolve('test/fixtures/hold-store-lock.sgl')], {+87
cwd: process.cwd(), env: { ...process.env,+88
FOLIO_LOCK_TEST_ROOT: root, FOLIO_LOCK_TEST_READY: ready, FOLIO_LOCK_TEST_RELEASE: release },+89
stdio: ['ignore', 'pipe', 'pipe'], 90
}); 91
holder.stdout.on('data', record); 92
holder.stderr.on('data', record);