https://github.com/wader/osleaktest
Checks for leaked fds, child processes and temp files
https://github.com/wader/osleaktest
file-descriptor go golang leak processes tempfiles testing
Last synced: over 1 year ago
JSON representation
Checks for leaked fds, child processes and temp files
- Host: GitHub
- URL: https://github.com/wader/osleaktest
- Owner: wader
- License: mit
- Created: 2019-07-23T19:06:27.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2020-01-05T15:40:57.000Z (over 6 years ago)
- Last Synced: 2025-03-14T19:46:45.052Z (over 1 year ago)
- Topics: file-descriptor, go, golang, leak, processes, tempfiles, testing
- Language: Go
- Homepage: https://pkg.go.dev/github.com/wader/osleaktest?tab=doc
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## osleaktest
Checks for leaked fds, child processes and temp files. Inspired by https://github.com/fortytw2/leaktest
### Usage
Note that `osleaktest` might not work well when running tests in parallel as the tests
run in the same process making it hard to know which resource is used by who.
```go
func Test(t *testing.T) {
defer osleaktest.Check(t)()
// test that uses fds, processes or temp files
}
```