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

Add tests for stateManagerCtx #558

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open
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
fix: fix setWithTTL method
Signed-off-by: KentHsu <chiahaohsu9@gmail.com>
KentHsu committed May 1, 2024
commit 977a3e5f9b7d40f2aaceeae0da40c2676b6be362
2 changes: 1 addition & 1 deletion actor/state/state_manager.go
Original file line number Diff line number Diff line change
@@ -167,7 +167,7 @@ func (s *stateManagerCtx) SetWithTTL(_ context.Context, stateName string, value
if metadata.Kind == None || metadata.Kind == Remove {
metadata.Kind = Update
}
s.stateChangeTracker.Store(stateName, NewChangeMetadata(metadata.Kind, value))
s.stateChangeTracker.Store(stateName, NewChangeMetadata(metadata.Kind, value).WithTTL(ttl))
return nil
}
s.stateChangeTracker.Store(stateName, (&ChangeMetadata{