Browse files

Fix random failures in replication.js test

This should fix the random failures for the 'expected "25" got "31"
error message that pops up occasionally. If my hunch is correct when we
remove the two docs from the source db its possible to get the writes on
the target out of order depending on a race condition.

This just sleeps a bit in between the deletions to try and reduce that
possibility. I haven't spotted this error after applying this patch.
  • Loading branch information...
1 parent fd1753e commit 843c8907adf16290dc618c9d0af159b01dc1a4b8 @davisp committed Mar 25, 2012
Showing with 1 addition and 0 deletions.
  1. +1 −0 share/www/script/test/replication.js
1 share/www/script/test/replication.js
@@ -1280,6 +1280,7 @@ couchTests.replication = function(debug) {
// delete docs from source
TEquals(true, sourceDb.deleteDoc(newDocs[0]).ok);
+ wait(1000);
TEquals(true, sourceDb.deleteDoc(newDocs[6]).ok);
waitForSeq(sourceDb, targetDb);

0 comments on commit 843c890

Please sign in to comment.