Test for db connection and functionality