Seems that it was probably my understanding of cats-effect Resource (or cats-effect in general) that was lacking.
moving the .allocated.unsafeRunSync()._1
to an object in Test and using that in the test classes worked.
import cats.effect.unsafe.implicits.global
object TransactorProvider {
lazy val transactor = DatabaseConfig.transactor.allocated.unsafeRunSync()._1
}
class DAOTest1 extends AsyncFlatSpec with AsyncIOSpec with IOChecker {
def transactor = TransactorProvider.transactor
...
...
...