-
Notifications
You must be signed in to change notification settings - Fork 32
Fixing how project config is updated. Also, fixing issue in Optimizely.close() #309
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
Conversation
I realize I have to fix 2 tests in |
@Nonnull String userId, | ||
@Nonnull Map<String, ?> attributes, | ||
@Nonnull ProjectConfig projectConfig) throws UnknownExperimentException { | ||
private Variation getVariation(@Nonnull ProjectConfig projectConfig, |
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.
Making this private as public methods are not supposed to take projectConfig
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.
Technically backwards incompatible, but I'm fine with it.
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.
Backwards incompatible because it was public in an alpha release? I think we should be comfortable removing this right away.
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.
Consider keeping tests for Closeable
implementations as well.
@Nonnull String userId, | ||
@Nonnull Map<String, ?> attributes, | ||
@Nonnull ProjectConfig projectConfig) throws UnknownExperimentException { | ||
private Variation getVariation(@Nonnull ProjectConfig projectConfig, |
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.
Technically backwards incompatible, but I'm fine with it.
Pull Request Test Coverage Report for Build 1091
💛 - Coveralls |
1 similar comment
Pull Request Test Coverage Report for Build 1091
💛 - Coveralls |
Summary
This change fixes:
Optimizely.close()
which currently checks thateventHandler
andprojectConfigManager
are instances ofCloseable
. Changing that to check if they are instances ofAutoCloseable
.ProjectConfig
is refetched every time ingetVariation
. Using the passing in config itself.ProjectConfig
is fetched multiple times whengetEnabledFeatures
is called. UpdatingisFeatureEnabled
.Test plan