operations: Fix flaky test for known-to-fail requests in UserApplyPatch
We have observed that one of our tests for UserApplyPatch
is flaky:
from time to time we receive an unexpected EOF while streaming the patch
data to the server side. As it turns out, this flakiness is our own
fault: we send a request header that is known to cause failure, which
means that the server will return an error as soon at it realizes that.
This is effectively causing a race between the client, which is trying
to send the patch data to the server, and the server which is realizing
the error and thus aborting the RPC call.
Fix this flake by stopping on EOF so that we can test for the real error
condition via CloseAndRecv()
.
Closes #4161 (closed)