Fix tests so that CSW subprocess finishes

Needed to add tests that responded to the callback that fires once the CSW server sub process is finished. Without them, the next tests started running before the sub process was closed. This led to port conflicts, and sub-processes hanging open indefinitely.