Backport of test_connect_delay refactor
Merge pull request #77 from ianbarber/master

Backport of test_connect_delay refactor from master