Fix for the current unit test hanging issue.

The current code won't close the database connection until the HTTP response has been fully consumed. One of the tests wasn't actually consuming the response, causing the DB connection to stay open and then hang on the dropping of the DB table.