cherry-picking a commit; just ensure connection class gets reassigned if a test fails
assign originalconnectioncls outside of try/finally block
Merge pull request #314 from kevinburke/test-failures

cherry-picking a commit; just ensure connection class gets reassigned if...