Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Distributed lock: add Lock (blocking) and RenewLock methods #3046

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' of https://github.com/dapr/components-contrib int…
…o lock-renew

Signed-off-by: ItalyPaleAle <43508+ItalyPaleAle@users.noreply.github.com>
  • Loading branch information
ItalyPaleAle committed Dec 18, 2023
commit 512d059bfc067196dfb0fcd2fe88432ca533f9e0
File renamed without changes.
2 changes: 1 addition & 1 deletion lock/redis/standalone.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"time"

"github.com/cenkalti/backoff/v4"
rediscomponent "github.com/dapr/components-contrib/internal/component/redis"
rediscomponent "github.com/dapr/components-contrib/common/component/redis"
"github.com/dapr/components-contrib/lock"
contribMetadata "github.com/dapr/components-contrib/metadata"
"github.com/dapr/kit/logger"
Expand Down
12 changes: 6 additions & 6 deletions lock/redis/standalone_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ func TestStandaloneRedisLock_InitError(t *testing.T) {
cfg.Properties["redisPassword"] = ""

// init
err := comp.Init(context.Background(), cfg)
assert.Error(t, err)
err := comp.InitLockStore(context.Background(), cfg)
require.Error(t, err)
})

t.Run("error when no host", func(t *testing.T) {
Expand All @@ -58,8 +58,8 @@ func TestStandaloneRedisLock_InitError(t *testing.T) {
cfg.Properties["redisPassword"] = ""

// init
err := comp.Init(context.Background(), cfg)
assert.Error(t, err)
err := comp.InitLockStore(context.Background(), cfg)
require.Error(t, err)
})

t.Run("error when wrong MaxRetries", func(t *testing.T) {
Expand All @@ -75,8 +75,8 @@ func TestStandaloneRedisLock_InitError(t *testing.T) {
cfg.Properties["maxRetries"] = "1 "

// init
err := comp.Init(context.Background(), cfg)
assert.Error(t, err)
err := comp.InitLockStore(context.Background(), cfg)
require.Error(t, err)
})
}

Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.