2025-04-21 14:45:57: merge [main:9224c7104716585740eabc8bceb4c75cea3746b2];

This commit is contained in:
txix committed 2025-04-21 14:45:57 +03:00
1 parent 2fc83f6b6e
commit df839dc7d7
9 files changed
+140 -83

No files matched your search

+5 -4
View File
@@ -6,11 +6,12 @@ import (
"testing"
"time"
"github.com/redis/go-redis/v9"
"golang.org/x/sync/errgroup"
"isp-lock-service/conf"
"isp-lock-service/repository"
"github.com/redis/go-redis/v9"
"golang.org/x/sync/errgroup"
"github.com/txix-open/isp-kit/test"
)
@@ -28,7 +29,7 @@ func TestOne(t *testing.T) {
rcli := NewRedis(tst)
ctx := context.Background()
r := repository.NewLocker(tst.Logger(), rcli, conf.Redis{Prefix: "testPrefix"})
r := repository.NewLocker(tst.Logger(), rcli, conf.Redis{Prefix: "testPrefix"}, conf.LockSettings{})
// success story
key := time.Now().String()
@@ -70,7 +71,7 @@ func TestConcurrency(t *testing.T) {
tst, required := test.New(t)
redis := NewRedis(tst)
r := repository.NewLocker(tst.Logger(), redis, conf.Redis{Prefix: "testPrefix"})
r := repository.NewLocker(tst.Logger(), redis, conf.Redis{Prefix: "testPrefix"}, conf.LockSettings{})
group, ctx := errgroup.WithContext(context.Background())
group.SetLimit(32)