rewriting the database connection test program