Code review comment for lp:~thisfred/u1db/sync_integration_tests

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 6/20/2012 9:27 PM, Eric Casteleijn wrote:
> Eric Casteleijn has proposed merging
> lp:~thisfred/u1db/sync_integration_tests into lp:u1db.
>
> Requested reviews: Ubuntu One hackers (ubuntuone-hackers) Related
> bugs: Bug #1006872 in U1DB: "sync_exchange should transmit the txid
> it thinks the target was at"
> https://bugs.launchpad.net/u1db/+bug/1006872
>
> For more details, see:
> https://code.launchpad.net/~thisfred/u1db/sync_integration_tests/+merge/111278
>
> Added integration tests for the detection of a diverged source or
> target db during sync and made them pass.
>

+ def test_sync_detects_rollback_in_source(self):
+ self.db1.create_doc(tests.simple_doc, doc_id="divergent")
+ self.sync(self.db1, self.db2)
+ # make db2 think it's synced with a much later version of db1
+ self.db2._set_sync_info(self.db1._replica_uid, 28, 'T-madeup')
+ self.assertRaises(
+ errors.InvalidGeneration, self.sync, self.db1, self.db2)

^- I think this is something that we eventually wanted to support, as
long as there wasn't a local change on source.

Otherwise, the diverged tests are certainly valid.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk/kIZsACgkQJdeBCYSNAAPCqQCgy7rzs2uAYMKIZMGKzVyiHrcZ
O7kAn1apHU4pnrBBhC0vNqWysVe+ny7g
=6nPi
-----END PGP SIGNATURE-----

« Back to merge proposal