|
17 | 17 |
|
18 | 18 | import ch.qos.logback.classic.Level;
|
19 | 19 | import com.google.common.collect.ImmutableMap;
|
20 |
| -import com.google.common.collect.Ordering; |
21 | 20 | import com.optimizely.ab.bucketing.Bucketer;
|
22 | 21 | import com.optimizely.ab.bucketing.DecisionService;
|
23 | 22 | import com.optimizely.ab.bucketing.FeatureDecision;
|
@@ -3393,37 +3392,6 @@ public void getEnabledFeatureWithValidUserId() throws ConfigParseException{
|
3393 | 3392 |
|
3394 | 3393 | }
|
3395 | 3394 |
|
3396 |
| - /** |
3397 |
| - * Verify {@link Optimizely#getEnabledFeatures(String, Map)} calls into |
3398 |
| - * {@link Optimizely#isFeatureEnabled(String, String, Map)} for each featureFlag |
3399 |
| - * return sorted List of FeatureFlags |
3400 |
| - * Also checks that the orignal list directly from projectConfig is unsorted |
3401 |
| - */ |
3402 |
| - @Test |
3403 |
| - public void getEnabledFeatureCheckingListIsSorted() throws ConfigParseException{ |
3404 |
| - assumeTrue(datafileVersion >= Integer.parseInt(ProjectConfig.Version.V4.toString())); |
3405 |
| - |
3406 |
| - Optimizely spyOptimizely = spy(Optimizely.builder(validDatafile, mockEventHandler) |
3407 |
| - .withConfig(validProjectConfig) |
3408 |
| - .build()); |
3409 |
| - ArrayList<String> featureFlagsSortedList = (ArrayList<String>) spyOptimizely.getEnabledFeatures(genericUserId, |
3410 |
| - new HashMap<String, String>()); |
3411 |
| - assertFalse(featureFlagsSortedList.isEmpty()); |
3412 |
| - |
3413 |
| - //To get Unsorted list directly from project config |
3414 |
| - List<String> unSortedFeaturesListFromProjectConfig = new ArrayList<String>(); |
3415 |
| - for (FeatureFlag featureFlag : spyOptimizely.projectConfig.getFeatureFlags()){ |
3416 |
| - String featureKey = featureFlag.getKey(); |
3417 |
| - unSortedFeaturesListFromProjectConfig.add(featureKey); |
3418 |
| - } |
3419 |
| - |
3420 |
| - //unSortedFeaturesListFromProjectConfig will retain only the elements which are also contained in featureFlagsSortedList. |
3421 |
| - unSortedFeaturesListFromProjectConfig.retainAll(featureFlagsSortedList); |
3422 |
| - assertFalse(Ordering.natural().isOrdered(unSortedFeaturesListFromProjectConfig)); |
3423 |
| - |
3424 |
| - assertTrue(Ordering.natural().isOrdered(featureFlagsSortedList)); |
3425 |
| - } |
3426 |
| - |
3427 | 3395 | /**
|
3428 | 3396 | * Verify {@link Optimizely#getEnabledFeatures(String, Map)} calls into
|
3429 | 3397 | * {@link Optimizely#isFeatureEnabled(String, String, Map)} for each featureFlag sending
|
|
0 commit comments