You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/06/14 02:54:10 UTC

[GitHub] [incubator-inlong] kipshi commented on a diff in pull request #4661: [INLONG-4660][Manager] PluginServiceTest adapts to the Windows system

kipshi commented on code in PR #4661:
URL: https://github.com/apache/incubator-inlong/pull/4661#discussion_r896326441


##########
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/core/plugin/PluginServiceTest.java:
##########
@@ -37,8 +38,18 @@ public class PluginServiceTest extends ServiceBaseTest {
 
     @Test
     public void testReloadPlugin() {
-        String path = Objects.requireNonNull(this.getClass().getClassLoader().getResource("")).getPath();
-        pluginService.setPluginLoc(path + "plugins");
+        String path = null;
+        try {
+            path = Paths.get(this.getClass().getClassLoader().getResource("").toURI()).toString();
+        } catch (URISyntaxException e) {
+            Assert.fail(e.getMessage());
+        }
+        String os = System.getProperty("os.name").toLowerCase();
+        if (os.startsWith(PluginClassLoader.WINDOWS_PREFIX)) {
+            pluginService.setPluginLoc(path + "\\plugins");

Review Comment:
   done



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org