Skip to content

Commit

Permalink
Fixing the replicator_db JS test
Browse files Browse the repository at this point in the history
  • Loading branch information
davisp committed Apr 25, 2012
1 parent 7d2fe95 commit 6c976bd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions share/www/script/test/replicator_db.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion src/couch_replicator/src/couch_replicator.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
},
Expand Down Expand Up @@ -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};
Expand Down

0 comments on commit 6c976bd

Please sign in to comment.