eiri commented on a change in pull request #650: Remove some sleeps from change
feed test.
URL: https://github.com/apache/couchdb/pull/650#discussion_r125935115
##########
File path: src/couch/test/couch_changes_tests.erl
##########
@@ -837,6 +843,27 @@ wait_finished({_, ConsumerRef}) ->
]})
end.
+
+reset_row_notifications() ->
+ receive
+ row ->
+ reset_row_notifications()
+ after 0 ->
+ ok
+ end.
+
+
+wait_row_notifications(N) ->
+ receive
+ row when N == 1 ->
+ ok;
+ row when N > 1 ->
+ wait_row_notifications(N - 1)
+ after ?TIMEOUT ->
+ timeout
Review comment:
I'd say `throw` here or raise an error, going to be less confusing than
none-match crash in the test's logs in case of the actual timeout. pause and
unpause do creative `?assertNotEqual(timeout, Resp),` for the same effect.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services