Github user kxepal commented on a diff in the pull request:
https://github.com/apache/couchdb-couch-replicator/pull/6#discussion_r22749827
--- Diff: test/couch_replicator_compact_tests.erl ---
@@ -123,9 +122,15 @@ check_active_tasks(RepPid, {BaseId, Ext} = _RepId,
Src, Tgt) ->
?assert(is_integer(couch_util:get_value(missing_revisions_found,
RepTask))),
?assert(is_integer(couch_util:get_value(checkpointed_source_seq,
RepTask))),
?assert(is_integer(couch_util:get_value(source_seq, RepTask))),
- Progress = couch_util:get_value(progress, RepTask),
- ?assert(is_integer(Progress)),
- ?assert(Progress =< 100).
+ Pending = couch_util:get_value(changes_pending, RepTask),
+ ?assert(is_integer(Pending)).
+
+wait_for_replicator(Pid) ->
+ %% since replicator started asynchronously
+ %% we need to wait when it would be in couch_task_status
+ %% we query replicator:details to ensure that do_init happen
+ couch_replicator:details(Pid),
--- End diff --
I would wrap this call with `?assertMatch({ok, _},
couch_replicator:details(Pid))` to be sure that result is positive.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---