nickva commented on code in PR #5093:
URL: https://github.com/apache/couchdb/pull/5093#discussion_r1645293999
##########
src/couch_replicator/src/couch_replicator_doc_processor.erl:
##########
@@ -843,7 +1019,7 @@ started_worker(_Id) ->
1 == meck:num_calls(couch_replicator_doc_processor_worker, spawn_worker,
4).
removed_job(Id) ->
- meck:called(couch_replicator_scheduler, remove_job, [test_rep(Id)]).
+ meck:called(couch_replicator_scheduler, remove_job, [Id]).
Review Comment:
Note: here before we were passing the wrong time to remove_job function. The
function should take a replication ID `{"123", "+continuous"}` not a `#rep{}`
record.
##########
src/couch_replicator/src/couch_replicator_doc_processor.erl:
##########
@@ -843,7 +1019,7 @@ started_worker(_Id) ->
1 == meck:num_calls(couch_replicator_doc_processor_worker, spawn_worker,
4).
removed_job(Id) ->
- meck:called(couch_replicator_scheduler, remove_job, [test_rep(Id)]).
+ meck:called(couch_replicator_scheduler, remove_job, [Id]).
Review Comment:
Note: here before we were passing the wrong type to `remove_job` function
previously. The function should take a replication ID `{"123", "+continuous"}`
not a `#rep{}` record.
##########
src/couch_replicator/src/couch_replicator_scheduler.erl:
##########
@@ -178,13 +178,13 @@ health_threshold() ->
?DEFAULT_HEALTH_THRESHOLD_SEC
).
--spec find_jobs_by_dbname(binary()) -> list(#rep{}).
+-spec find_jobs_by_dbname(binary()) -> list(rep_id()).
Review Comment:
The typespec is wrong here as we return a a list of rep_ids not `#rep{}`
records. This is probably where the mocked test function in the doc_processor
module had mistakenly copied the wrong type from.
--
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]