mattisonchao commented on code in PR #18816:
URL: https://github.com/apache/pulsar/pull/18816#discussion_r1042993394


##########
pulsar-proxy/src/test/java/org/apache/pulsar/proxy/server/ProxyConfigurationTest.java:
##########
@@ -110,4 +110,26 @@ public void testBackwardCompatibility() throws IOException 
{
         assertEquals(serviceConfig.getMetadataStoreSessionTimeoutMillis(), 
100);
         assertEquals(serviceConfig.getMetadataStoreCacheExpirySeconds(), 300);
     }
+
+
+    @Test
+    public void testConvert() throws IOException {
+        File testConfigFile = new File("tmp." + System.currentTimeMillis() + 
".properties");
+        if (testConfigFile.exists()) {
+            testConfigFile.delete();
+        }
+        try (PrintWriter printWriter = new PrintWriter(new 
OutputStreamWriter(new FileOutputStream(testConfigFile)))) {
+            printWriter.println("proxyAdditionalServlets=a,b,c");
+        }
+        testConfigFile.deleteOnExit();
+        try(InputStream stream = new FileInputStream(testConfigFile)) {
+            ProxyConfiguration proxyConfig = 
PulsarConfigurationLoader.create(stream, ProxyConfiguration.class);
+            
assertEquals(proxyConfig.getProperties().getProperty("proxyAdditionalServlets"),
 "a,b,c");
+            assertEquals(proxyConfig.getProxyAdditionalServlets().size(), 3);
+            PulsarConfigurationLoader.convertFrom(proxyConfig);

Review Comment:
   No, This PR just want to check the regression.



-- 
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