Adjusted test case to use a single connection for the query.