Test failures were due to socket reuse issues. Insert small delay after shutting down server