Convert test_encode_fetch_request to struct.pack format, improve test reliability