After doing “npm run build” it finds the test and gives the output below.
After creating store.library.books (100Mib) and setting the size of the cbjs bucket being created to 100Mib it runs fine with the exception of “Tests closed successfully but something prevents the main process from exiting”. I’m guessing that a cluster is not being closed.
(node:36719) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.
(Use node --trace-deprecation ... to show where the warning was created)
stdout | tests/kv.spec.ts > kv > should isolate an insert
{ title: ‘insert’ }
✓ |project:keyspace-isolation| tests/kv.spec.ts (2) 2333ms
✓ kv (2) 2072ms
✓ should isolate an insert 2072ms
↓ should isolate a get [skipped]
HTML Report is generated
You can run npx vite preview --outDir tests-report to see the test results.
close timed out after 10000ms
Tests closed successfully but something prevents the main process from exiting
You can try to identify the cause by enabling “hanging-process” reporter. See Configuring Vitest | Vitest
Does the error only occur when the collection doesn’t exist?
The test should succeed without creating the keyspace. It is created on demand.
I have reproduced the issue with node 18, 20 and 21 on MacOS.
On linux (GitHub Actions), I have a core dump but for some reason the segfault is not logged. See workflow run.
PS: If you retry, be careful because I’ve migrated to pnpm on this very branch. Use npx npkill to remove all node_modules and then run pnpm i
my issue with the the buckets was that I didn’t have enough space in my cluster to create the cbjs_xxx bucket. I don’t think the store bucket is ever accessed. I added some logging just to make sure the code-paths were being executed. It runs fine. Note that I am using node v21.7.1. I’ve ran it on a single-node cluster and a three-node cluster. Enabling trace logging might help you with trouble-shooting. export CBPPLOGLEVEL=trace
% ./node_modules/.bin/vitest kv --project=project:keyspace-isolation --run --no-file-parallelism -t "insert"
RUN v1.5.0 /Users/michaelreiche/cbj/cbjs
(node:96558) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
stdout | tests/kv.spec.ts > kv > should isolate an insert
inserting...
Collection {
DEFAULT_NAME: '_default',
scope: Scope {
bucket: Bucket { cluster: [Cluster], name: 'store', conn: Connection {} },
name: 'library',
conn: Connection {}
},
name: 'books',
conn: Connection {},
kvScanTimeout: 75000,
scanBatchItemLimit: 50,
scanBatchByteLimit: 15000
}
stdout | tests/kv.spec.ts > kv > should isolate an insert
inserted
MutationResult {
cas: Cas<1714058878347444224>,
token: MutationToken<cbjs_store_8272bd09:10:89946137241247:6>
}
stdout | tests/kv.spec.ts > kv > should isolate an insert
content
{ title: 'insert' }
✓ |project:keyspace-isolation| tests/kv.spec.ts (2) 4313ms
✓ kv (2) 3284ms
✓ should isolate an insert 3284ms
↓ should isolate a get [skipped]
Test Files 1 passed (1)
Tests 1 passed | 1 skipped (2)
Start at 08:27:53
Duration 6.74s (transform 1.22s, setup 417ms, collect 5ms, tests 4.31s, environment 0ms, prepare 1.33s)
HTML Report is generated
You can run npx vite preview --outDir tests-report to see the test results.
close timed out after 10000ms
Tests closed successfully but something prevents the main process from exiting
You can try to identify the cause by enabling "hanging-process" reporter. See https://vitest.dev/config/#reporters
michaelreiche@C02C2172MD6V cbjs % pwd
/Users/michaelreiche/cbj/cbjs
cbjs % node --version
v21.7.1
I find it odd that in your stack trace, increment_request is reference from insert_request.
(ins)cbjs $ npm ci -ws --include-workspace-root
npm ERR! No workspaces found!
npm ERR! A complete log of this run can be found in:
npm ERR! $HOME/.npm/_logs/2024-04-25T18_52_22_911Z-debug-0.log