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

feat(ForcedDecisions): add forced-decisions APIs to OptimizelyUserContext #451

Merged
merged 43 commits into from
Nov 4, 2021

Conversation

The-inside-man
Copy link
Contributor

Summary

Add a set of new APIs for forced-decisions to OptimizelyUserContext:

  • setForcedDecision
  • getForcedDecision
  • removeForcedDecision
  • removeAllForcedDecisions

Test plan

  • unit tests for the new APIs
  • FSC tests with new test cases

The-inside-man and others added 23 commits September 28, 2021 12:22
…new class OptimizelyForcedDecisionsKey which uses the toString to build a key based on a flagKey and ruleKey, where rulekey, if null wil be the string equivelant and then all converted to its hashcode string equivelant.
@coveralls
Copy link

coveralls commented Oct 14, 2021

Pull Request Test Coverage Report for Build 1897

  • 207 of 214 (96.73%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.2%) to 90.715%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core-api/src/main/java/com/optimizely/ab/Optimizely.java 21 23 91.3%
core-api/src/main/java/com/optimizely/ab/OptimizelyUserContext.java 53 58 91.38%
Totals Coverage Status
Change from base Build 1862: 0.2%
Covered Lines: 4875
Relevant Lines: 5374

💛 - Coveralls

@The-inside-man The-inside-man removed their assignment Oct 14, 2021
@The-inside-man The-inside-man marked this pull request as ready for review October 14, 2021 17:21
@The-inside-man The-inside-man requested a review from a team as a code owner October 14, 2021 17:21
…er SimpleEntry from AbstractMap instead of Pair since no longer supported in Java 11
… variations map per flag and changed implementation to use a Map using variation.id as the key to ensure.
@jaeopt jaeopt closed this Nov 1, 2021
@jaeopt jaeopt reopened this Nov 1, 2021
Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All the changes look great!
I suggested a couple of more changes and adding tests for events/notifications.

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One more request

@The-inside-man The-inside-man removed their assignment Nov 3, 2021
Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! One more comment.

@The-inside-man
Copy link
Contributor Author

Looks good! One more comment.

Roger! Committed the change!

Copy link
Contributor

@jaeopt jaeopt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with a nit

Copy link

@dustin-sier dustin-sier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@The-inside-man The-inside-man merged commit 04d379a into master Nov 4, 2021
@The-inside-man The-inside-man deleted the jbrown/forcedDecisions branch November 4, 2021 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants