Added time out and make sure that we have a database before testing.