mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-22 07:07:58 +01:00
Fix experiments in BackupAuthManager
This commit is contained in:
committed by
ravi-signal
parent
a9b5359f7c
commit
e7d1eadf8e
@@ -7,6 +7,7 @@ package org.whispersystems.textsecuregcm.tests.util;
|
||||
|
||||
import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration;
|
||||
import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicExperimentEnrollmentConfiguration;
|
||||
import org.whispersystems.textsecuregcm.experiment.ExperimentEnrollmentManager;
|
||||
import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
@@ -17,7 +18,7 @@ import static org.mockito.Mockito.when;
|
||||
|
||||
public class ExperimentHelper {
|
||||
|
||||
public static DynamicConfigurationManager<DynamicConfiguration> withEnrollment(
|
||||
private static DynamicConfigurationManager<DynamicConfiguration> withEnrollment(
|
||||
final String experimentName,
|
||||
final Set<UUID> enrolledUuids,
|
||||
final int enrollmentPercentage) {
|
||||
@@ -31,11 +32,11 @@ public class ExperimentHelper {
|
||||
return dcm;
|
||||
}
|
||||
|
||||
public static DynamicConfigurationManager<DynamicConfiguration> withEnrollment(final String experimentName, final Set<UUID> enrolledUuids) {
|
||||
return withEnrollment(experimentName, enrolledUuids, 0);
|
||||
public static ExperimentEnrollmentManager withEnrollment(final String experimentName, final Set<UUID> enrolledUuids) {
|
||||
return new ExperimentEnrollmentManager(withEnrollment(experimentName, enrolledUuids, 0));
|
||||
}
|
||||
|
||||
public static DynamicConfigurationManager<DynamicConfiguration> withEnrollment(final String experimentName, final UUID enrolledUuid) {
|
||||
return withEnrollment(experimentName, Set.of(enrolledUuid), 0);
|
||||
public static ExperimentEnrollmentManager withEnrollment(final String experimentName, final UUID enrolledUuid) {
|
||||
return new ExperimentEnrollmentManager(withEnrollment(experimentName, Set.of(enrolledUuid), 0));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user