Fix: clean up getConnection() test properly#29
Open
alxndrsn wants to merge 2 commits intosailshq:masterfrom
Open
Fix: clean up getConnection() test properly#29alxndrsn wants to merge 2 commits intosailshq:masterfrom
alxndrsn wants to merge 2 commits intosailshq:masterfrom
Conversation
rachaelshaw
requested changes
Jan 9, 2020
| }); | ||
|
|
||
| after(function(done) { | ||
| manager.pool.end(done); |
Member
There was a problem hiding this comment.
Should we use the mp-postgresql destroyManager method for this?
Author
There was a problem hiding this comment.
Thinking about this more, I think the above approach is preferable to using the library under test for cleanup.
| assert(report.connection.release); | ||
| // Assert that the connection has a release function, and call it to | ||
| // release the connection. | ||
| report.connection.release(); |
Member
There was a problem hiding this comment.
Should we keep the assert here?
Author
There was a problem hiding this comment.
Does it add value? If report.connection.release is not defined, then this line will throw anyway.
Member
There was a problem hiding this comment.
Fair point, but I'd like to keep this PR to just the minimal set of changes needed for the fix
rachaelshaw
requested changes
Feb 27, 2020
alxndrsn
commented
Feb 28, 2020
| assert(report.connection.release); | ||
| // Assert that the connection has a release function, and call it to | ||
| // release the connection. | ||
| report.connection.release(); |
Author
There was a problem hiding this comment.
So your preference would be something like below?
// Assert that the connection has a release function
assert(report.connection.release);
// Call the release function on the connection to release the connection
report.connection.release();
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fix for balderdashy/sails#6908 will allow
mochato be updated to the latest version.