Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

521 test robustness pgbouncer #522

Merged
merged 7 commits into from
Jul 30, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
More descriptive comment about the intent of the code
As suggested in review comment.
Rafa de la Torre committed Jul 30, 2018
commit 2afe845d7800ea6e5ffbd09362cef0415d65ad22
2 changes: 1 addition & 1 deletion test/support/db_utils.js
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ module.exports.resetPgBouncerConnections = function (callback) {
port: dbConfig.db_port
});

// We just chain a PAUSE followed by a RESUME
// We just chain a PAUSE followed by a RESUME to reset internal pool connections of PgBouncer
client.connect();
client.query('PAUSE', (err, res) => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please, follow Node.js conventions:

client.query('PAUSE', (err, res) => {
  if (err) {
    return callback(err);
  }
  client.query('RESUME', (err, res) => ...);
}

If you inmediatly return after calling the callback, there is no need to wrap following sentences into a else statement.

if (err) {