-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix failure case in segment evaluation + add more tests for segment e…
…valuation
- Loading branch information
Showing
6 changed files
with
98 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/ConfigCat.Client.Tests/data/evaluationlog/segment/segment_no_targeted_attribute.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
WARNING [3003] Cannot evaluate condition (User.Email IS ONE OF ['[email protected]', '[email protected]']) for setting 'featureWithNegatedSegmentTargetingCleartext' (the User.Email attribute is missing). You should set the User.Email attribute in order to make targeting work properly. Read more: https://configcat.com/docs/advanced/user-object/ | ||
INFO [5000] Evaluating 'featureWithNegatedSegmentTargetingCleartext' for User '{"Identifier":"12345"}' | ||
Evaluating targeting rules and applying the first match if any: | ||
- IF User IS NOT IN SEGMENT 'Beta users (cleartext)' | ||
( | ||
Evaluating segment 'Beta users (cleartext)': | ||
- IF User.Email IS ONE OF ['[email protected]', '[email protected]'] => false, skipping the remaining AND conditions | ||
Segment evaluation result: cannot evaluate, the User.Email attribute is missing. | ||
Condition (User IS NOT IN SEGMENT 'Beta users (cleartext)') failed to evaluate. | ||
) | ||
THEN 'True' => cannot evaluate, the User.Email attribute is missing | ||
The current targeting rule is ignored and the evaluation continues with the next rule. | ||
Returning 'False'. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Identifier;Email;Country;Custom1;featureWithSegmentTargeting;featureWithSegmentTargetingCleartext;featureWithNegatedSegmentTargeting;featureWithNegatedSegmentTargetingCleartext;featureWithSegmentTargetingInverse;featureWithSegmentTargetingInverseCleartext;featureWithNegatedSegmentTargetingInverse;featureWithNegatedSegmentTargetingInverseCleartext | ||
##null##;;;;False;False;False;False;False;False;False;False | ||
;;;;False;False;False;False;False;False;False;False | ||
[email protected];[email protected];##null##;##null##;True;True;False;False;False;False;True;True | ||
[email protected];[email protected];##null##;##null##;True;True;False;False;False;False;True;True | ||
[email protected];[email protected];##null##;##null##;False;False;True;True;True;True;False;False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters