Skip to content

Commit 42d9387

Browse files
committed
add third rollout rule for english citizen audience that is not disjoint from previous rollout rules
1 parent 3b0b514 commit 42d9387

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

core-api/src/test/java/com/optimizely/ab/config/ValidProjectConfigV4.java

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,36 @@ public class ValidProjectConfigV4 {
812812
5000
813813
)
814814
)
815-
815+
);
816+
private static final Experiment ROLLOUT_2_RULE_3 = new Experiment(
817+
"2637642575",
818+
"2637642575",
819+
Experiment.ExperimentStatus.RUNNING.toString(),
820+
ROLLOUT_2_ID,
821+
Collections.singletonList(AUDIENCE_ENGLISH_CITIZENS_ID),
822+
Collections.singletonList(
823+
new Variation(
824+
"2346257680",
825+
"2346257680",
826+
ProjectConfigTestUtils.createListOfObjects(
827+
new LiveVariableUsageInstance(
828+
"675244127",
829+
"D"
830+
),
831+
new LiveVariableUsageInstance(
832+
"4052219963",
833+
"udley"
834+
)
835+
)
836+
)
837+
),
838+
Collections.<String, String>emptyMap(),
839+
Collections.singletonList(
840+
new TrafficAllocation(
841+
"2346257680",
842+
5000
843+
)
844+
)
816845
);
817846
private static final Experiment ROLLOUT_2_EVERYONE_ELSE_RULE = new Experiment(
818847
"828245624",
@@ -849,6 +878,7 @@ public class ValidProjectConfigV4 {
849878
ProjectConfigTestUtils.createListOfObjects(
850879
ROLLOUT_2_RULE_1,
851880
ROLLOUT_2_RULE_2,
881+
ROLLOUT_2_RULE_3,
852882
ROLLOUT_2_EVERYONE_ELSE_RULE
853883
)
854884
);

core-api/src/test/resources/config/valid-project-config-v4.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,6 +618,36 @@
618618
}
619619
]
620620
},
621+
{
622+
"id": "2637642575",
623+
"key": "2637642575",
624+
"status": "Running",
625+
"layerId": "813411034",
626+
"audienceIds": ["4194404272"],
627+
"forcedVariations": {},
628+
"variations": [
629+
{
630+
"id": "2346257680",
631+
"key": "2346257680",
632+
"variables": [
633+
{
634+
"id": "675244127",
635+
"value": "D"
636+
},
637+
{
638+
"id": "4052219963",
639+
"value": "udley"
640+
}
641+
]
642+
}
643+
],
644+
"trafficAllocation": [
645+
{
646+
"entityId": "2346257680",
647+
"endOfRange": 5000
648+
}
649+
]
650+
},
621651
{
622652
"id": "828245624",
623653
"key": "828245624",

0 commit comments

Comments
 (0)