David Li created ARROW-8160:
-------------------------------

             Summary: [FlightRPC][C++] DoPutPayloadWriter doesn't always expose 
server error message
                 Key: ARROW-8160
                 URL: https://issues.apache.org/jira/browse/ARROW-8160
             Project: Apache Arrow
          Issue Type: Bug
          Components: C++, FlightRPC
    Affects Versions: 0.16.0
            Reporter: David Li


{noformat}
C:/projects/arrow/cpp/src/arrow/flight/flight_test.cc(1261): error: Value of: 
status.message()
Expected: has substring "Invalid token"
  Actual: "Could not write record batch to stream: "
[  FAILED  ] TestBasicAuthHandler.FailUnauthenticatedCalls (17 ms)
{noformat}

This happens because {{Close()}} calls {{RecordBatchPayloadWriter::Close()}}, 
which calls {{CheckStarted}}, which in turn tries to write data. If the data 
gets flushed and the server responds in time, we'll see a failure during 
writing, causing us to never check the server status (which is the last part of 
{{DoPutPayloadWriter::Close}}). We need to reliably check and expose the gRPC 
status.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to