golang-neo4j-bolt-driver icon indicating copy to clipboard operation
golang-neo4j-bolt-driver copied to clipboard

Add constructor method to build pool with configurable timeouts

Open eldeal opened this issue 7 years ago • 2 comments

Needed to increase the timeout for all connections in a pool, so made the timeouts configurable on a pool

(a few things got picked up by the linter as well)

eldeal avatar Nov 22 '18 16:11 eldeal

I think the only thing we're missing is tests for the new public function, but looks good to me.

scott-wilson avatar Nov 23 '18 03:11 scott-wilson

Good point! I'm finding it difficult to get to a meaningful test as the new function and OpenPool both return interfaces so I can't inspect any of the private fields.

I've added a GetTimeout() function to the boltConn type, as this seems the clearest way of allowing the timeout to be inspected - though currently the only use for that is a test, so would understand if that makes people uneasy to have a public function specifically to facilitate testing.

Happy to change it if a clearer solution can be found!

eldeal avatar Nov 23 '18 10:11 eldeal