added timeout and retry for socket connection in integration tests