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.
Merge pull request #729 from senior/maint/master/streaming-facts-hanging-failure

Fix for the current unit test hanging issue.