1
0
Fork 0
mirror of https://github.com/anyproto/any-sync.git synced 2025-06-08 05:57:03 +09:00

Add flush logic

This commit is contained in:
mcrakhman 2024-06-22 16:43:38 +02:00
parent 74ba1fe6d2
commit 7aa784a985
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B
5 changed files with 36 additions and 18 deletions

View file

@ -742,7 +742,7 @@ func TestObjectTree(t *testing.T) {
})
require.NoError(t, err, "iterate should be without error")
assert.Equal(t, []string{"0", "1", "2", "3", "4"}, iterChangesId)
// before flush
// before Flush
assert.Equal(t, "0", objTree.Root().Id)
// check storage
@ -761,7 +761,7 @@ func TestObjectTree(t *testing.T) {
err = objTree.Flush()
require.NoError(t, err)
// after flush
// after Flush
assert.Equal(t, "3", objTree.Root().Id)
for _, ch := range rawChanges {
treeCh, err := objTree.GetChange(ch.Id)