micro-analytics / micro-analytics/micro-analytics-cli
Connection leaks in adapter tests
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 732
- Forks
- 39
- PR merge metrics
- No merged PRs in 30d
Description
The adapter tests does not close connection correctly resulting in tests for the redis adapter never quitting.
The problem is the at the moment is call init should not throw. Overwrites the connections with new one and then when the tests closes connection in afterEach the connection created in beforeEach is not closed.
I think it would be a good thing to require adapter.close() and handle the closing of database connections in the adapter utils.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the adapter tests around call init should not throw, then inspect the adapter utils and the beforeEach/afterEach connection lifecycle. Reproduce the Redis adapter tests and trace which connection is replaced; done means every connection created by the tests is closed and the Redis tests quit cleanly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js, redis
- Domain
- backend, databases, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100