Unwrap proxied DataSources in SqlScriptsTestExecutionListener
Prior to this commit, if the DataSource in the DataSourceFromTransactionManager was wrapped in a proxy implementing InfrastructureProxy, SqlScriptsTestExecutionListener would throw an exception stating that the DataSource in the ApplicationContext and the DataSource in the DataSourceFromTransactionManager were not the same. This commit unwraps both data sources and compares the underlying target instances to check for equality. In addition, this commit makes the unwrapResourceIfNecessary() method in TransactionSynchronizationUtils public. Closes gh-26422
Showing
想要评论请 注册 或 登录