Skip to content

Commit

Permalink
test(mae-consumer): test for injection of pe-consumer (datahub-projec…
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Jun 22, 2024
1 parent 79ad582 commit 710e605
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions metadata-jobs/mae-consumer-job/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand All @@ -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);
}
}

0 comments on commit 710e605

Please sign in to comment.