test for listening on a port