rewrite test for pool and socket.