* Pass callback to client.end
* Add test for pool.end method
* fix: remove excessive _pulseQueue call
* fix: context problem
* fix: test resolve should be called when the last client is removed
* fix: wait for pool.end()
Because when you don't pass a callback to .end() it always returns a promise
* fix: handle idle timeout test data race
---------
Co-authored-by: Asadbek Raimov <asadbekraimov642@gmail.com>
Based on the suggestion from #2078. This adds ref/unref methods to the
Connection and Client classes and then uses them to allow the process to
exit if all of the connections in the pool are idle. This behavior is
controlled by the allowExitOnIdle flag to the Pool constructor; it defaults
to the old behavior.