Skip to content

Conversation

@msohailhussain
Copy link
Contributor

No description provided.

mnoman09 and others added 3 commits February 21, 2018 20:23
1) updated datafile
2) updated testCases
Feature toggleability Added.
Updated testcases.
@optibot
Copy link

optibot commented Feb 22, 2018

Can one of the admins verify this patch?

Copy link
Contributor

@wangjoshuah wangjoshuah left a comment

Choose a reason for hiding this comment

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

looks mostly good. Make sure to describe the test cases.

@thomaszurkan-optimizely any feedback from you?

}

@Test
public void isFeatureEnabledTrueWhenFeatureEnabledOfVariationIsTrue() throws Exception{
Copy link
Contributor

Choose a reason for hiding this comment

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

describe the test case in in comments above

}

@Test
public void isFeatureEnabledFalseWhenFeatureEnabledOfVariationIsFalse() throws Exception{
Copy link
Contributor

Choose a reason for hiding this comment

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

add test description here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add one more explicit test: isFeatureEnabledFalseWhenFeatureEnabledOfVariationIsNotPresentInJson ?
Feel free to not use that name.

@wangjoshuah
Copy link
Contributor

build

1 similar comment
@mikeproeng37
Copy link
Contributor

build

Copy link
Contributor

@thomaszurkan-optimizely thomaszurkan-optimizely left a comment

Choose a reason for hiding this comment

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

After re-reviewing the design documents, it is not a bug for the datafile variation to not have feature_enable. If it is not present it is assumed to be false. I see that the Java SDK json parsers handle this but I don’t see a test case. Did I just miss it?

@JsonProperty("variables") List<LiveVariableUsageInstance> liveVariableUsageInstances) {
this.id = id;
this.key = key;
this.featureEnabled = featureEnabled;
Copy link
Contributor

Choose a reason for hiding this comment

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

I see in the JSON parsers you make sure that the featureEnabled is not null. Can't you do that here as well? if (featureEnbaled == null) set it to false. Just for safety sake.

}

@Test
public void isFeatureEnabledFalseWhenFeatureEnabledOfVariationIsFalse() throws Exception{
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add one more explicit test: isFeatureEnabledFalseWhenFeatureEnabledOfVariationIsNotPresentInJson ?
Feel free to not use that name.

* Added unit test of if featureenabled is not set thn
@mikeproeng37
Copy link
Contributor

build

1 similar comment
@wangjoshuah
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

@wangjoshuah
Copy link
Contributor

build

Copy link
Contributor

@wangjoshuah wangjoshuah 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 think @thomaszurkan-optimizely wanted one more test case added though.

* feature enabled will return false by default
*/
@Test
public void isFeatureEnabledWithExperimentKeyForcedWithNoFeatureEnabledSet() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

@thomaszurkan-optimizely here is the test case I am checking in which we are not setting featureEnabled variable in datafile and in config so its returning false by default

@mikeproeng37
Copy link
Contributor

build

@coveralls
Copy link

Pull Request Test Coverage Report for Build 471

  • 21 of 21 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 88.691%

Totals Coverage Status
Change from base Build 470: 0.07%
Covered Lines: 2188
Relevant Lines: 2467

💛 - Coveralls

1 similar comment
@coveralls
Copy link

Pull Request Test Coverage Report for Build 471

  • 21 of 21 (100.0%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.07%) to 88.691%

Totals Coverage Status
Change from base Build 470: 0.07%
Covered Lines: 2188
Relevant Lines: 2467

💛 - Coveralls

@thomaszurkan-optimizely thomaszurkan-optimizely merged commit 7e76897 into master Feb 26, 2018
@wangjoshuah wangjoshuah deleted the sohail/featuretoggleabilitypr branch February 28, 2018 21:41
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.

8 participants