You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2021/11/04 03:26:06 UTC
[GitHub] [dolphinscheduler] CalvinKirs commented on a change in pull request #6674: [Feature][unittest] Recover UT in AlertPluginManagerTest.java #6619
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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org