Properly close tuple iterator in test framework.
Merge pull request #896 from daisyzhou/develop

Properly close tuple iterator in test framework.