Allow experiments to exclude by ACI

This commit is contained in:
Ravi Khadiwala authored and ravi-signal committed 2024-10-08 15:02:58 -05:00
1 parent 93515e5a0f
commit 9d980f36b0
3 files changed
+26 -3

No files matched your search

@@ -45,6 +45,7 @@ class ExperimentEnrollmentManagerTest {
private Random random;
private static final UUID ACCOUNT_UUID = UUID.randomUUID();
private static final UUID EXCLUDED_UUID = UUID.randomUUID();
private static final String UUID_EXPERIMENT_NAME = "uuid_test";
private static final String E164_AND_UUID_EXPERIMENT_NAME = "e164_uuid_test";
@@ -98,6 +99,12 @@ class ExperimentEnrollmentManagerTest {
when(experimentEnrollmentConfiguration.getEnrollmentPercentage()).thenReturn(100);
assertTrue(experimentEnrollmentManager.isEnrolled(account.getUuid(), UUID_EXPERIMENT_NAME));
when(experimentEnrollmentConfiguration.getExcludedUuids()).thenReturn(Set.of(EXCLUDED_UUID));
when(experimentEnrollmentConfiguration.getEnrollmentPercentage()).thenReturn(100);
when(uuidSelector.getUuidEnrollmentPercentage()).thenReturn(100);
when(uuidSelector.getUuids()).thenReturn(Set.of(EXCLUDED_UUID));
assertFalse(experimentEnrollmentManager.isEnrolled(EXCLUDED_UUID, UUID_EXPERIMENT_NAME));
}
@Test