Fix issues with DB-related integration tests.