From 0007f0c02a5c88fe37b98bd8bc41be4921be2b39 Mon Sep 17 00:00:00 2001 From: Tucker Whitehouse Date: Thu, 5 Sep 2024 10:39:37 -0400 Subject: [PATCH] Add pattern and selector to PromisePoolCluster#getConnection The implementation of `PromisePoolCluster#getConnection` does not match the capabilities of `PoolCluster#getConnection` nor the definition in `promise.d.ts`. This change corrects this by adding the missing `pattern` and `selector` parameters which are passed through to the underlying method. Fixes #1381 Note: I may have missed them, but I didn't see any tests for PromisePoolCluster to update or add to with this change. --- promise.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/promise.js b/promise.js index 95c5808b45..5d80e21e72 100644 --- a/promise.js +++ b/promise.js @@ -451,10 +451,10 @@ class PromisePoolCluster extends EventEmitter { inheritEvents(poolCluster, this, ['warn', 'remove']); } - getConnection() { + getConnection(pattern, selector) { const corePoolCluster = this.poolCluster; return new this.Promise((resolve, reject) => { - corePoolCluster.getConnection((err, coreConnection) => { + corePoolCluster.getConnection(pattern, selector, (err, coreConnection) => { if (err) { reject(err); } else {