From dacde9340fbde497c310376adc62c61633189fdc Mon Sep 17 00:00:00 2001 From: elisa lee Date: Wed, 22 Jan 2025 13:02:51 -0600 Subject: [PATCH] Fix flaky sendOrgAdminEmailCSV test (#8427) --- .../service/OrganizationServiceTest.java | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/backend/src/test/java/gov/cdc/usds/simplereport/service/OrganizationServiceTest.java b/backend/src/test/java/gov/cdc/usds/simplereport/service/OrganizationServiceTest.java index a3194a0af3..a43ec643e3 100644 --- a/backend/src/test/java/gov/cdc/usds/simplereport/service/OrganizationServiceTest.java +++ b/backend/src/test/java/gov/cdc/usds/simplereport/service/OrganizationServiceTest.java @@ -19,7 +19,6 @@ import gov.cdc.usds.simplereport.api.model.errors.IllegalGraphqlArgumentException; import gov.cdc.usds.simplereport.api.model.errors.OrderingProviderRequiredException; import gov.cdc.usds.simplereport.config.FeatureFlagsConfig; -import gov.cdc.usds.simplereport.config.simplereport.DemoUserConfiguration; import gov.cdc.usds.simplereport.db.model.DeviceType; import gov.cdc.usds.simplereport.db.model.Facility; import gov.cdc.usds.simplereport.db.model.Organization; @@ -34,7 +33,6 @@ import gov.cdc.usds.simplereport.db.repository.OrganizationRepository; import gov.cdc.usds.simplereport.db.repository.PatientRegistrationLinkRepository; import gov.cdc.usds.simplereport.db.repository.PersonRepository; -import gov.cdc.usds.simplereport.db.repository.ProviderRepository; import gov.cdc.usds.simplereport.idp.repository.OktaRepository; import gov.cdc.usds.simplereport.service.email.EmailService; import gov.cdc.usds.simplereport.test_util.SliceTestConfiguration.WithSimpleReportOrgAdminUser; @@ -61,17 +59,15 @@ class OrganizationServiceTest extends BaseServiceTest { @Autowired private PatientRegistrationLinkRepository patientRegistrationLinkRepository; - @Autowired @SpyBean private FacilityRepository facilityRepository; - @Autowired @SpyBean private OrganizationRepository organizationRepository; + @SpyBean private FacilityRepository facilityRepository; + @SpyBean private OrganizationRepository organizationRepository; @Autowired private DeviceTypeRepository deviceTypeRepository; - @Autowired @SpyBean private OktaRepository oktaRepository; - @Autowired @SpyBean private PersonRepository personRepository; - @Autowired @SpyBean private ProviderRepository providerRepository; + @SpyBean private OktaRepository oktaRepository; + @SpyBean private PersonRepository personRepository; @Autowired ApiUserRepository _apiUserRepo; - @Autowired private DemoUserConfiguration userConfiguration; - @Autowired @SpyBean private EmailService emailService; - @Autowired @SpyBean private DbAuthorizationService dbAuthorizationService; - @Autowired @MockBean private FeatureFlagsConfig featureFlagsConfig; + @MockBean private EmailService emailService; + @SpyBean private DbAuthorizationService dbAuthorizationService; + @MockBean private FeatureFlagsConfig featureFlagsConfig; @BeforeEach void setupData() {