dovecot-2.0: dsync: Fixed unit tests

dovecot at dovecot.org dovecot at dovecot.org
Sun Jul 11 20:38:00 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/cd4db940dcbf
changeset: 11787:cd4db940dcbf
user:      Timo Sirainen <tss at iki.fi>
date:      Sun Jul 11 18:37:56 2010 +0100
description:
dsync: Fixed unit tests

diffstat:

 src/dsync/test-dsync-brain.c |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (32 lines):

diff -r fd33ccbf235e -r cd4db940dcbf src/dsync/test-dsync-brain.c
--- a/src/dsync/test-dsync-brain.c	Sun Jul 11 18:32:43 2010 +0100
+++ b/src/dsync/test-dsync-brain.c	Sun Jul 11 18:37:56 2010 +0100
@@ -73,7 +73,7 @@
 		memcmp(cbox->name_sha1.guid, obox->name_sha1.guid,
 		       sizeof(cbox->name_sha1.guid)) == 0 &&
 		cbox->uid_validity == obox->uid_validity &&
-		cbox->uid_next == 0 && cbox->highest_modseq == 0;
+		cbox->uid_next == 1 && cbox->highest_modseq == 0;
 }
 
 static bool
@@ -189,6 +189,9 @@
 	/* check mailbox updates */
 	brain->state++;
 	dsync_brain_sync(brain);
+	test_assert(brain->state == DSYNC_STATE_SYNC_UPDATE_MAILBOXES);
+	dsync_brain_sync(brain);
+	test_assert(brain->state == DSYNC_STATE_SYNC_END);
 
 	brain_boxes = array_get(&brain->mailbox_sync->mailboxes, &count);
 	test_assert(count == 7);
@@ -260,6 +263,9 @@
 	/* check mailbox updates */
 	brain->state++;
 	dsync_brain_sync(brain);
+	test_assert(brain->state == DSYNC_STATE_SYNC_UPDATE_MAILBOXES);
+	dsync_brain_sync(brain);
+	test_assert(brain->state == DSYNC_STATE_SYNC_END);
 
 	brain_boxes = array_get(&brain->mailbox_sync->mailboxes, &count);
 	test_assert(count == 1);


More information about the dovecot-cvs mailing list