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); } }