Improve tests for connection blocked handling
Merge bug25717 into default