Fixed hanging test. The test now closes the result set.