Improve embedded socket server test behavior