freeznet commented on code in PR #16675:
URL: https://github.com/apache/pulsar/pull/16675#discussion_r925389455


##########
pulsar-io/common/src/main/java/org/apache/pulsar/io/common/IOConfigUtils.java:
##########
@@ -40,6 +43,15 @@ public static <T> T loadWithSecrets(Map<String, Object> map, 
Class<T> clazz, Sin
         return loadWithSecrets(map, clazz, secretName -> 
sinkContext.getSecret(secretName));
     }
 
+    public static Map<String, Object> loadConfigFromJsonString(String config) 
throws JsonProcessingException {
+        if (!isBlank(config)) {
+            ObjectMapper mapper = new ObjectMapper();
+            return mapper.readValue(config, new TypeReference<Map<String, 
Object>>() {
+            });
+        } else {
+            return new HashMap<>();

Review Comment:
   addressed in the latest commit.



##########
pulsar-io/debezium/core/src/test/java/org/apache/pulsar/io/debezium/PulsarDatabaseHistoryTest.java:
##########
@@ -239,4 +248,13 @@ public void testExists() throws Exception {
         // dummytopic should not exist yet
         assertFalse(history.exists());
     }
+
+    @Test
+    public void testSubscriptionName() throws Exception {
+        // happy path
+        testHistoryTopicContent(true, false, true);
+        assertTrue(history.exists());
+        List<String> subscriptions = 
admin.topics().getSubscriptions(topicName);
+        assertTrue(subscriptions.contains("my-subscription"));

Review Comment:
   fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to