Skip to content

Fix: SendImpressionEvent will return false when event is not sent #420

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

Merged
merged 3 commits into from
Jan 27, 2021

Conversation

mnoman09
Copy link
Contributor

Summary

  • SendImpressionEvent will return false when event is not sent and return true when sent successfully
  • In case of userEvent is null it will return false

@coveralls
Copy link

Pull Request Test Coverage Report for Build 1654

  • 2 of 3 (66.67%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.002%) to 89.956%

Changes Missing Coverage Covered Lines Changed/Added Lines %
core-api/src/main/java/com/optimizely/ab/Optimizely.java 2 3 66.67%
Totals Coverage Status
Change from base Build 1648: -0.002%
Covered Lines: 4451
Relevant Lines: 4948

💛 - Coveralls

@coveralls
Copy link

coveralls commented Jan 27, 2021

Pull Request Test Coverage Report for Build 1656

  • 3 of 3 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 89.976%

Totals Coverage Status
Change from base Build 1648: 0.02%
Covered Lines: 4452
Relevant Lines: 4948

💛 - Coveralls

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 - I added more tests for decisionEventDispatched

@@ -495,6 +495,112 @@ public void decide_doNotSendEvent_withOption() {
OptimizelyDecision decision = user.decide(flagKey, Arrays.asList(OptimizelyDecideOption.DISABLE_DECISION_EVENT));

assertEquals(decision.getVariationKey(), "variation_with_traffic");

Copy link
Contributor

Choose a reason for hiding this comment

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

please update Copyright header.

Copy link
Contributor

@msohailhussain msohailhussain left a comment

Choose a reason for hiding this comment

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

lgtm

@jaeopt jaeopt merged commit 06b128e into master Jan 27, 2021
@jaeopt jaeopt deleted the mnoman/dispatchedEventVarFix branch January 27, 2021 23:01
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.

4 participants