diff --git a/psc/src/test/java/com/pinterest/psc/metadata/client/TestPscMetadataClient.java b/psc/src/test/java/com/pinterest/psc/metadata/client/TestPscMetadataClient.java index 30fef16..8d3ea67 100644 --- a/psc/src/test/java/com/pinterest/psc/metadata/client/TestPscMetadataClient.java +++ b/psc/src/test/java/com/pinterest/psc/metadata/client/TestPscMetadataClient.java @@ -14,25 +14,14 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; public class TestPscMetadataClient { protected static final String testKafkaTopic1 = "plaintext:" + TopicUri.SEPARATOR + TopicUri.STANDARD + ":kafka:env:aws_us-west-1::kafkacluster01:topic1"; - @Test - void testGetBackendMetadataClient() throws Exception { - String fallbackDiscoveryFilename = DiscoveryUtil.createTempFallbackFile(); - PscConfiguration pscConfiguration = new PscConfiguration(); - pscConfiguration.addProperty(PscConfiguration.PSC_DISCOVERY_FALLBACK_FILE, fallbackDiscoveryFilename); - pscConfiguration.addProperty(PscConfiguration.PSC_METADATA_CLIENT_ID, "test-metadata-client"); - - PscMetadataClient pscMetadataClient = new PscMetadataClient(pscConfiguration); - PscBackendMetadataClient backendMetadataClient = pscMetadataClient.getBackendMetadataClient(TopicUri.validate(testKafkaTopic1)); - assertEquals(PscKafkaMetadataClient.class, backendMetadataClient.getClass()); - assertEquals("kafkacluster01001:9092,kafkacluster01002:9092", backendMetadataClient.getDiscoveryConfig().getConnect()); - pscMetadataClient.close(); - } - @Test void testCreateTopicRn() throws TopicUriSyntaxException { TopicRn topic1Rn = TopicUri.validate(testKafkaTopic1).getTopicRn();