couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Filipe David Manana <fdman...@gmail.com>
Subject Re: _replicator DB
Date Fri, 28 May 2010 09:13:37 GMT
On Fri, May 28, 2010 at 1:26 AM, J Chris Anderson <jchris@gmail.com> wrote:

>
>
> hmm, 3rd time I've tried to send this...
>

I also get most of my @dev mails dropped. There's clearly an irritating
issue with the mail server.


>
> I've been working on the test cases for the replicator db, to remove wait()
> from the test. I think this will make them more robust as well.
>

I do agree. The test suite takes about 40 ~ 50 seconds in my machines.

>
> Instead of waiting, I wrote functions to check a replication doc for state
> == "complete" or another, to wait for the update_seq of two databases to
> match.
>
> There are a couple of places where I had to leave wait() in. These are in
> spots with assertions that a particular replication *did stop* when a
> document is deleted. So you have to wait and then see if the docs are there
> or not. I can't think of way to test for this, otherwise. (Unless maybe
> active_tasks is accurate enough to use in these assertions.)
>

Particularly, I have to do a wait() (of at least 500ms) after the server is
restarted in my machine.
Yeah, testing that a replication was stopped through deletion of the
corresponding replication document is just that: delete document, wait a
bit, add new document to source, and finally verify that the document was
not replicated to the target DB.


> I plan to dig into the meat of the patch soon but wanted to start with the
> tests.
>
> The commit is here:
>
> http://github.com/jchris/couchdb/tree/fdm/nrd
>
> Thanks for all the hard work, Filipe, and everyone who's giving feedback.


Thanks for looking into this and the improvement of the test suite.


>
> Chris
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message