+ 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/
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 6/20/2012 9:27 PM, Eric Casteleijn wrote: /bugs.launchpad .net/u1db/ +bug/1006872 /code.launchpad .net/~thisfred/ u1db/sync_ integration_ tests/+ merge/111278
> 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:/
>
> For more details, see:
> https:/
>
> 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): create_ doc(tests. simple_ doc, doc_id="divergent") _set_sync_ info(self. db1._replica_ uid, 28, 'T-madeup') InvalidGenerati on, self.sync, self.db1, self.db2)
+ self.db1.
+ self.sync(self.db1, self.db2)
+ # make db2 think it's synced with a much later version of db1
+ self.db2.
+ self.assertRaises(
+ errors.
^- 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 enigmail. mozdev. org/
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://
iEYEARECAAYFAk/ kIZsACgkQJdeBCY SNAAPCqQCgy7rzs 2uAYMKIZMGKzVyi HrcZ BhC0vNqWysVe+ ny7g
O7kAn1apHU4pnrB
=6nPi
-----END PGP SIGNATURE-----