ConnectionWrapper#rollback(Savepoint) delegates to Connection#rollback() instead of Connection#rollback(Savepoint): https://github.com/testcontainers/testcontainers-java/blob/b6a5248365acb240cd6f6c7d3c1ae38c6c5b3ed7/modules/jdbc/src/main/java/org/testcontainers/jdbc/ConnectionWrapper.java#L165-L168
Hi @knutwannheden,
Thanks for spotting it! This sounds like a perfect task for contribution :)
In case somebody wants to work on it, I recommend the following:
ConnectionDelegate class, accept Connection as an argument and mark it with Lombok's @DelegateConnectionWrapper from ConnectionDelegate and override close to trigger the callbackThis way we ensure that all methods are delegated correctly.
FYI this approach is also described in the following blog post:
https://bsideup.github.io/posts/easy_java_delegates/
Hi, I would like to take this up
Most helpful comment
Hi, I would like to take this up