mirror of
https://github.com/codex-storage/nim-codex.git
synced 2025-01-09 12:35:51 +00:00
bd594c9aaf
* adding tracker for streamstore * adding tracker tests * Sets up tracker helper functions and closes streams in testnode.nim * Deploying checksuite for memory leak tracker checking. * Successfully deploys checksuite and asyncchecksuite. * Fix leak in testpor.nim * Fixes leaked storestream in testnetwork.nim * Fixes integration tests * Cleanup * cleanup comment by Mark --------- Co-authored-by: benbierens <thatbenbierens@gmail.com>
28 lines
513 B
Nim
28 lines
513 B
Nim
import ./helpers
|
|
|
|
## Unit testing suite that calls checkTrackers in teardown to check for memory leaks using chronos trackers.
|
|
template checksuite*(name, body) =
|
|
suite name:
|
|
multisetup()
|
|
|
|
teardown:
|
|
checkTrackers()
|
|
|
|
# Avoids GcUnsafe2 warnings with chronos
|
|
# Copied from asynctest/templates.nim
|
|
let suiteproc = proc =
|
|
body
|
|
|
|
suiteproc()
|
|
|
|
template asyncchecksuite*(name, body) =
|
|
suite name:
|
|
asyncmultisetup()
|
|
|
|
teardown:
|
|
checkTrackers()
|
|
|
|
body
|
|
|
|
export helpers
|