remove log4j-api and modify AlertMapperTest (#975)

* rename from DatasourceUserMapper to DataSourceUserMapper

* add unit test in UserMapper and WorkerGroupMapper

* change cn.escheduler to org.apache.dolphinscheduler

* add unit test in UdfFuncMapperTest

* add unit test in UdfFuncMapperTest

* remove DatabaseConfiguration

* add ConnectionFactoryTest

* cal duration in processInstancesList

* change desc to description

* change table name in mysql ddl

* change table name in mysql ddl

* change escheduler to dolphinscheduler

* change escheduler to dolphinscheduler

* change escheduler to dolphinscheduler

* remove log4j-1.2-api and modify AlertMapperTest

* remove log4j-1.2-api
This commit is contained in:
lgcareer 2019-10-09 19:39:58 +08:00 committed by qiaozhanwei
parent 6a48b98513
commit 5448d0c6fd
4 changed files with 16 additions and 1 deletions

View File

@ -89,6 +89,12 @@
<dependency>
<groupId>org.apache.dolphinscheduler</groupId>
<artifactId>dolphinscheduler-dao</artifactId>
<exclusions>
<exclusion>
<artifactId>log4j-api</artifactId>
<groupId>org.apache.logging.log4j</groupId>
</exclusion>
</exclusions>
</dependency>
</dependencies>

View File

@ -47,7 +47,7 @@ public class PropertyUtils {
}
private void init(){
String[] propertyFiles = new String[]{ALERT_PROPERTIES_PATH,DATA_SOURCE_PROPERTIES_PATH};
String[] propertyFiles = new String[]{ALERT_PROPERTIES_PATH};
for (String fileName : propertyFiles) {
InputStream fis = null;
try {

View File

@ -59,6 +59,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</exclusion>
<exclusion>
<artifactId>log4j-api</artifactId>
<groupId>org.apache.logging.log4j</groupId>
</exclusion>
</exclusions>
</dependency>

View File

@ -17,6 +17,8 @@
package org.apache.dolphinscheduler.dao.mapper;
import org.apache.dolphinscheduler.common.enums.AlertStatus;
import org.apache.dolphinscheduler.common.enums.AlertType;
import org.apache.dolphinscheduler.common.enums.ShowType;
import org.apache.dolphinscheduler.dao.entity.Alert;
import org.junit.Assert;
import org.junit.Test;
@ -40,8 +42,11 @@ public class AlertMapperTest {
private Alert insertOne(){
//insertOne
Alert alert = new Alert();
alert.setContent("[{'type':'WORKER','host':'192.168.xx.xx','event':'server down','warning level':'serious'}]");
alert.setLog("success");
alert.setReceivers("xx@aa.com");
alert.setAlertType(AlertType.EMAIL);
alert.setShowType(ShowType.TABLE);
alert.setAlertGroupId(1);
alert.setAlertStatus(AlertStatus.EXECUTION_SUCCESS);
alert.setCreateTime(new Date());