Correct sync states of live sync ends

This commit is contained in:
lash
2022-03-19 00:52:47 +00:00
parent e48b62679d
commit 5f2809c394
3 changed files with 57 additions and 16 deletions

View File

@@ -188,5 +188,22 @@ class TestFs(unittest.TestCase):
o.next(advance_block=True)
def test_sync_head_future(self):
store = SyncFsStore(self.path, session_id='foo')
session = SyncSession(store)
session.start()
logg.debug('list {} {} {}'.format(store.state.list(store.state.SYNC), store.state.list(store.state.DONE), store.state.list(store.state.NEW)))
o = session.get(0)
o.next(advance_block=True)
o.next(advance_block=True)
session.stop(o)
logg.debug('list {} {} {}'.format(store.state.list(store.state.SYNC), store.state.list(store.state.DONE), store.state.list(store.state.NEW)))
store = SyncFsStore(self.path, session_id='foo')
store.start()
o = store.get(2)
if __name__ == '__main__':
unittest.main()