So that failing tests don't cause the server thread to hang
indefinitely, waiting for connections that will never come.
Rationale for suppressing error/traceback from interrupted
_accept_connection in testserver.Server:
https://gist.github.com/brettdh/b6e741227b2297f19d2118077f14dfa5
* Move server socket close to just before join
This way it handles the no-connections, no-exceptions case
as well as the exception case. If the server thread doesn't
exit by itself within 5 seconds of the context manager exit,
the accept will be interrupted.
* Address feedback
- pytest.raises rather than except:pass
- Move socket create/bind back to run()
- Timeout on accepting connections