changing how tests shutdown server (for some reason the previous approach started leaving address in use on Windows)