CalvinKirs commented on a change in pull request #6674:
URL: https://github.com/apache/dolphinscheduler/pull/6674#discussion_r742511344
##########
File path:
dolphinscheduler-alert/src/test/java/org/apache/dolphinscheduler/alert/plugin/AlertPluginManagerTest.java
##########
@@ -53,6 +54,14 @@ public void testLoadPlugins() {
alertPluginManagerConfig.setMavenLocalRepository(Objects.requireNonNull(PropertyUtils.getString(AlertServer.MAVEN_LOCAL_REPOSITORY)).trim());
}
+
+ DolphinPluginLoader alertPluginLoader = new
DolphinPluginLoader(alertPluginManagerConfig,
ImmutableList.of(alertPluginManager));
+ try {
+ alertPluginLoader.loadPlugins();
+ } catch (Exception e) {
+ throw new RuntimeException("load Alert Plugin Failed !", e);
+ }
+
Review comment:
It is best to do this, `public void testMethod() throws MyException {`
No need to use try-catch to catch exceptions.
--
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]