[PATCH v2] testbot: Better wrap the database backend code.