[WIP] Create function like TestOnBorrow that includes context#442
[WIP] Create function like TestOnBorrow that includes context#442MorrisLaw wants to merge 1 commit intogomodule:masterfrom
Conversation
stevenh
left a comment
There was a problem hiding this comment.
I'm not sure this can ever be of use if I'm honest as this is setup on the pool so the ctx with a timeout, which would be the desired use, will expire and resulting in all future calls failing.
|
|
||
| // TestOnBorrowWithContext is the same as TestOnBorrow, but includes | ||
| // the context. | ||
| TestOnBorrowWithContext func(c Conn, t time.Time, ctx context.Context) error |
There was a problem hiding this comment.
Context should always be the first parameter, I would also drop the With so its just TestOnBorrowContext as per Dial and DailContext
I agree @stevenh , seems kind of pointless then... Should we just close this PR out? |
|
Closing based on timeout and other feedback. |
But wouldn't it be called with the |
|
I take it back, @dcormier is correct, reopening. |
This is an initial PR to address issue #439