You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2019/10/30 21:48:03 UTC

[GitHub] [couchdb] jaydoane commented on a change in pull request #2290: Show source and target proxies in _scheduler/docs output

jaydoane commented on a change in pull request #2290: Show source and target proxies in _scheduler/docs output
URL: https://github.com/apache/couchdb/pull/2290#discussion_r340874894
 
 

 ##########
 File path: src/couch_replicator/src/couch_replicator_scheduler.erl
 ##########
 @@ -1479,6 +1481,31 @@ t_job_summary_crashing_many_times() ->
     end).
 
 
+t_job_summary_proxy_fields() ->
+    ?_test(begin
+        Job =  #job{
+            id = job1,
+            history = [started(10), added()],
+            rep = #rep{
+                source = #httpdb{
+                    url = "https://s",
+                    proxy_url = "http://u:p@sproxy:12"
+                },
+                target = #httpdb{
+                    url = "http://t",
+                    proxy_url = "socks5://u:p@tproxy:34"
+                }
+            }
+        },
+        setup_jobs([Job]),
+        Summary = job_summary(job1, ?DEFAULT_HEALTH_THRESHOLD_SEC),
+        ?assertEqual(<<"http://u:*****@sproxy:12">>,
+            proplists:get_value(source_proxy, Summary)),
+        ?assertEqual(<<"socks5://u:*****@tproxy:34">>,
 
 Review comment:
   this is failing for me:
   ```
     couch_replicator_scheduler:1485: t_job_summary_proxy_fields...*failed*
   in function couch_replicator_scheduler:'-t_job_summary_proxy_fields/0-fun-1-'/1 (src/couch_replicator_scheduler.erl, line 1505)
   in call from eunit_test:run_testfun/1 (eunit_test.erl, line 71)
   in call from eunit_proc:run_test/1 (eunit_proc.erl, line 510)
   in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 335)
   in call from eunit_proc:handle_test/2 (eunit_proc.erl, line 493)
   in call from eunit_proc:tests_inorder/3 (eunit_proc.erl, line 435)
   in call from eunit_proc:with_timeout/3 (eunit_proc.erl, line 325)
   in call from eunit_proc:run_group/2 (eunit_proc.erl, line 549)
   **error:{assertEqual,[{module,couch_replicator_scheduler},
                 {line,1505},
                 {expression,"proplists : get_value ( target_proxy , Summary )"},
                 {expected,<<"socks5://u:*****@tproxy:34">>},
                 {value,<<"socks5://u:p@tproxy:34">>}]}
     output:<<"">>
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services