healchow commented on code in PR #4661:
URL: https://github.com/apache/incubator-inlong/pull/4661#discussion_r895754700
##########
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:
Maybe using a constant for `plugins` and `File.separator` is better.
--
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]