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

Fix tests

This commit is contained in:
Mikhail Rakhmanov 2025-04-22 16:13:18 +02:00
parent 68af5f1320
commit d2498a1c56
No known key found for this signature in database
GPG key ID: DED12CFEF5B8396B

View file

@ -2,12 +2,14 @@ package commonspace
import (
"context"
"errors"
"fmt"
"math/rand"
"sync"
"testing"
"time"
anystore "github.com/anyproto/any-store"
"github.com/anyproto/go-chash"
"github.com/stretchr/testify/require"
"go.uber.org/zap"
@ -803,6 +805,9 @@ func newMultiPeerFixture(t *testing.T, peerNum int) *multiPeerFixture {
err := listStorage.AddAll(ctx, []list.StorageRecord{
{RawRecord: rec.Payload, Id: rec.Id, PrevId: prevRec, Order: i + 1, ChangeSize: len(rec.Payload)},
})
if errors.Is(err, anystore.ErrDocExists) {
continue
}
require.NoError(t, err)
}
}