-
Notifications
You must be signed in to change notification settings - Fork 20
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
Feat: Add thread-safe UserAttributes in read/write operations. #253
Conversation
and classes related to it
BugFix of userAttributes Unit tests fix
This reverts commit 6c9ac4d.
BugFix of userAttributes Unit tests fix
Added Unit tests of above functions
Throwing not implemented exceptions for not implemented functions in optimizelyUserContext Added detailed documentation of optimizelyUserContext and Decision class
# Conflicts: # OptimizelySDK.Tests/OptimizelyUserContextTest.cs # OptimizelySDK/OptimizelyUserContext.cs
# Conflicts: # OptimizelySDK/Optimizely.cs
# Conflicts: # OptimizelySDK/OptimizelyUserContext.cs
# Conflicts: # OptimizelySDK.Tests/OptimizelyUserContextTest.cs
# Conflicts: # OptimizelySDK.Tests/OptimizelyDecisions/OptimizelyDecisionTest.cs # OptimizelySDK.Tests/OptimizelyUserContextTest.cs # OptimizelySDK/Optimizely.cs # OptimizelySDK/OptimizelyDecisions/DefaultDecisionReasons.cs # OptimizelySDK/OptimizelyUserContext.cs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing a mutex lock while making a copy. Other than that, all looks good!
|
||
public UserAttributes GetAttributes() | ||
{ | ||
return new UserAttributes(Attributes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we need a mutex protection for this copy with the same lock for setAttribute?
|
||
public UserAttributes GetAttributes() | ||
{ | ||
return new UserAttributes(Attributes); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, mutex needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…DecideOptions).ToArray(); with copiedOptions = options.Union(DefaultDecideOptions).ToArray();
# Conflicts: # OptimizelySDK.Tests/OptimizelyUserContextTest.cs # OptimizelySDK/Optimizely.cs
…utes # Conflicts: # OptimizelySDK/Optimizely.cs
…userattributes # Conflicts: # OptimizelySDK.Tests/OptimizelyTest.cs # OptimizelySDK.Tests/OptimizelyUserContextTest.cs # OptimizelySDK/Optimizely.cs # OptimizelySDK/OptimizelyUserContext.cs
Summary
Test plan
Updated all Unit tests