Set catalog when executing rule tests in transactions
@@ -147,6 +147,10 @@ public class RuleAssert
{
return transaction(transactionManager, accessControl)
.singleStatement()
- .execute(session, transactionSessionConsumer);
+ .execute(session, session -> {
+ // metadata.getCatalogHandle() registers the catalog for the transaction
+ session.getCatalog().ifPresent(catalog -> metadata.getCatalogHandle(session, catalog));
+ return transactionSessionConsumer.apply(session);
+ });
}
}
