test(hygiene): close the brain typeAware.bench.test.ts creates
Some checks failed
CI / Node 22 (push) Failing after 7m54s
CI / Node 24 (push) Failing after 7m39s
CI / Bun (latest) (push) Successful in 12m29s
CI / Integration + conformance (Node 22) (push) Failing after 16m16s
Some checks failed
CI / Node 22 (push) Failing after 7m54s
CI / Node 24 (push) Failing after 7m39s
CI / Bun (latest) (push) Successful in 12m29s
CI / Integration + conformance (Node 22) (push) Failing after 16m16s
Excluded from the correctness gate (tests/performance/**, run only via npm run test:perf) but still leaked: brainMemory was created in a beforeEach with no matching afterEach.
This commit is contained in:
parent
ba10aaf52e
commit
6eb5e4483d
1 changed files with 5 additions and 1 deletions
|
|
@ -17,7 +17,7 @@
|
||||||
* - Note limitations and edge cases
|
* - Note limitations and edge cases
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { describe, it, expect, beforeEach } from 'vitest'
|
import { describe, it, expect, beforeEach, afterEach } from 'vitest'
|
||||||
import { Brainy } from '../../src/brainy.js'
|
import { Brainy } from '../../src/brainy.js'
|
||||||
import { TypeAwareStorageAdapter } from '../../src/storage/adapters/typeAwareStorageAdapter.js'
|
import { TypeAwareStorageAdapter } from '../../src/storage/adapters/typeAwareStorageAdapter.js'
|
||||||
import { FileSystemStorage } from '../../src/storage/adapters/fileSystemStorage.js'
|
import { FileSystemStorage } from '../../src/storage/adapters/fileSystemStorage.js'
|
||||||
|
|
@ -67,6 +67,10 @@ describe('TypeAware Performance Benchmarks', () => {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
afterEach(async () => {
|
||||||
|
await brainMemory.close()
|
||||||
|
})
|
||||||
|
|
||||||
it('should measure type-based query performance', async () => {
|
it('should measure type-based query performance', async () => {
|
||||||
// MEASURED: Query for one type (200 entities)
|
// MEASURED: Query for one type (200 entities)
|
||||||
const start = performance.now()
|
const start = performance.now()
|
||||||
|
|
|
||||||
Reference in a new issue