improved testDbConnection