Skip to content

Conversation

msohailhussain
Copy link
Contributor

No description provided.

@optibot
Copy link
Contributor

optibot commented Feb 19, 2018

Can one of the admins verify this patch?

@mikeproeng37
Copy link
Contributor

build

@@ -317,6 +317,10 @@ public void TestInit()
};

Assert.IsTrue(TestData.CompareObjects(expectedRolloutIdMap, Config.RolloutIdMap));

// Verify that featureEnabled property of variation is false if not defined.
var variation = new Variation { Id = "test_experiment", Key = "control" };
Copy link
Contributor

Choose a reason for hiding this comment

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

Please separate out into its own test case

@@ -16,11 +16,13 @@
"audienceIds": ["7718080042"],
"variations": [{
"id": "7722370027",
"key": "control"
"key": "control",
Copy link
Contributor

Choose a reason for hiding this comment

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

Are these feature experiments? We should only be adding it to variations that belong to experiments that have a feature attached to them.

@@ -355,21 +355,16 @@ public virtual bool IsFeatureEnabled(string featureKey, string userId, UserAttri
return false;

var decision = DecisionService.GetVariationForFeature(featureFlag, userId, userAttributes);
if (decision == null)
if (decision == null || !decision.Variation.FeatureEnabled)
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you null-check the Variation as well

separate test case as per suggestion.
@mikeproeng37
Copy link
Contributor

build

Copy link
Contributor

@mikeproeng37 mikeproeng37 left a comment

Choose a reason for hiding this comment

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

lgtm

@mikeproeng37 mikeproeng37 merged commit 3566826 into master Feb 21, 2018
@msohailhussain msohailhussain deleted the sohail/featuretog_pr branch June 4, 2018 20:43
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