couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: [2/8] git commit: Fixing the replicator_db JS test
Date Thu, 26 Apr 2012 11:26:10 GMT
On Thu, Apr 26, 2012 at 12:18 AM,  <davisp@apache.org> wrote:
> Fixing the replicator_db JS test
>
>
> Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
> Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/6c976bd9
> Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/6c976bd9
> Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/6c976bd9
>
> Branch: refs/heads/master
> Commit: 6c976bd948565305c006746f449dc8cd21a749e1
> Parents: 7d2fe95
> Author: Paul Joseph Davis <davisp@apache.org>
> Authored: Mon Mar 26 15:17:02 2012 -0500
> Committer: Paul Joseph Davis <davisp@apache.org>
> Committed: Wed Apr 25 16:54:08 2012 -0500
>
> ----------------------------------------------------------------------
>  share/www/script/test/replicator_db.js        |    4 ++++
>  src/couch_replicator/src/couch_replicator.erl |    5 ++++-
>  2 files changed, 8 insertions(+), 1 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c976bd9/share/www/script/test/replicator_db.js
> ----------------------------------------------------------------------
> diff --git a/share/www/script/test/replicator_db.js b/share/www/script/test/replicator_db.js
> index 48ca341..edc85f4 100644
> --- a/share/www/script/test/replicator_db.js
> +++ b/share/www/script/test/replicator_db.js
> @@ -1076,6 +1076,10 @@ couchTests.replicator_db = function(debug) {
>     });
>     TEquals(200, xhr.status);
>
> +    // Temporary band-aid, give the replicator db some
> +    // time to make the switch
> +    wait(500);
> +
>     new_doc = {
>       _id: "foo666",
>       value: 666
>
> http://git-wip-us.apache.org/repos/asf/couchdb/blob/6c976bd9/src/couch_replicator/src/couch_replicator.erl
> ----------------------------------------------------------------------
> diff --git a/src/couch_replicator/src/couch_replicator.erl b/src/couch_replicator/src/couch_replicator.erl
> index 1f7c08a..e91e1ae 100644
> --- a/src/couch_replicator/src/couch_replicator.erl
> +++ b/src/couch_replicator/src/couch_replicator.erl
> @@ -112,7 +112,7 @@ async_replicate(#rep{id = {BaseId, Ext}, source = Src, target = Tgt}
= Rep) ->
>         RepChildId,
>         {gen_server, start_link, [?MODULE, Rep, [{timeout, Timeout}]]},
>         temporary,
> -        1,
> +        250,
>         worker,
>         [?MODULE]
>     },
> @@ -333,6 +333,9 @@ do_init(#rep{options = Options, id = {BaseId, Ext}} = Rep) ->
>     }.
>
>
> +handle_info(shutdown, St) ->
> +    {stop, shutdown, St};
> +
>  handle_info({'DOWN', Ref, _, _, Why}, #rep_state{source_monitor = Ref} = St) ->
>     ?LOG_ERROR("Source database is down. Reason: ~p", [Why]),
>     {stop, source_db_down, St};
>


Never had an issue there. What was the problem? I have the feeling it
may be related to

https://issues.apache.org/jira/browse/COUCHDB-1461

- benoît

Mime
View raw message