From 710e605941577a253faaa8bfcd4198766b14e1ad Mon Sep 17 00:00:00 2001 From: david-leifker <114954101+david-leifker@users.noreply.github.com> Date: Sat, 22 Jun 2024 09:29:33 -0500 Subject: [PATCH] test(mae-consumer): test for injection of pe-consumer (#10755) --- metadata-jobs/mae-consumer-job/build.gradle | 1 + .../metadata/kafka/MaeConsumerApplicationTest.java | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/metadata-jobs/mae-consumer-job/build.gradle b/metadata-jobs/mae-consumer-job/build.gradle index f3d1ca9885044..4980f81d61bb4 100644 --- a/metadata-jobs/mae-consumer-job/build.gradle +++ b/metadata-jobs/mae-consumer-job/build.gradle @@ -30,6 +30,7 @@ dependencies { implementation externalDependency.logbackClassic testImplementation project(':metadata-dao-impl:kafka-producer') + testImplementation project(':metadata-jobs:pe-consumer') testImplementation externalDependency.springBootTest testImplementation externalDependency.mockito testImplementation externalDependency.testng diff --git a/metadata-jobs/mae-consumer-job/src/test/java/com/linkedin/metadata/kafka/MaeConsumerApplicationTest.java b/metadata-jobs/mae-consumer-job/src/test/java/com/linkedin/metadata/kafka/MaeConsumerApplicationTest.java index 4e413c8598fb4..c9bf25200513f 100644 --- a/metadata-jobs/mae-consumer-job/src/test/java/com/linkedin/metadata/kafka/MaeConsumerApplicationTest.java +++ b/metadata-jobs/mae-consumer-job/src/test/java/com/linkedin/metadata/kafka/MaeConsumerApplicationTest.java @@ -2,6 +2,7 @@ import static org.testng.AssertJUnit.*; +import com.datahub.event.PlatformEventProcessor; import com.linkedin.metadata.entity.EntityService; import com.linkedin.metadata.search.EntitySearchService; import com.linkedin.metadata.service.FormService; @@ -14,7 +15,8 @@ @ActiveProfiles("test") @SpringBootTest( - classes = {MaeConsumerApplication.class, MaeConsumerApplicationTestConfiguration.class}) + classes = {MaeConsumerApplication.class, MaeConsumerApplicationTestConfiguration.class}, + properties = "PE_CONSUMER_ENABLED=true") public class MaeConsumerApplicationTest extends AbstractTestNGSpringContextTests { @Autowired private EntityService mockEntityService; @@ -25,10 +27,13 @@ public class MaeConsumerApplicationTest extends AbstractTestNGSpringContextTests @Autowired private EntitySearchService entitySearchService; + @Autowired private PlatformEventProcessor platformEventProcessor; + @Test public void testMaeConsumerAutoWiring() { assertNotNull(mockEntityService); assertNotNull(kafkaHealthIndicator); assertNotNull(formService); + assertNotNull(platformEventProcessor); } }