nickva commented on code in PR #5702:
URL: https://github.com/apache/couchdb/pull/5702#discussion_r2436913859


##########
test/elixir/test/changes_async_test.exs:
##########
@@ -94,11 +94,13 @@ defmodule ChangesAsyncTest do
 
     create_doc_bar(db_name, "bar")
 
-    changes = process_response(req_id.id, &parse_event/1)
+    retry_until(fn ->

Review Comment:
   process_response doesn't seem to be idempotent so it seems fishy that we 
retry at all here.
   
   The way it seems to work is it parses body lines from the socket or gets a 
timeout and returns. It could be that in one run we parse one line, then 
timeout, but on retry that 1st line won't be refetched, as far as the socket is 
concerned it's already yielded the result. So on a retry we may get the second 
line only and still fail.
   
   It seems the original idea of sleeping a little would have worked better, 
however, I wonder if we just need to increase the default timeout here instead. 
Now it's 1 second and I think you're saying that leads to timeouts in your 
environment, let's raise the process_response timeout to maybe 3 or 5 seconds.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to