From ff42844cff2e74810e9474b7543d69ad7f662dea Mon Sep 17 00:00:00 2001 From: liuhuijuan Date: Tue, 23 Jun 2020 16:54:02 +0800 Subject: [PATCH 1/3] fix release for nginx bug --- .../main/assembly/dolphinscheduler-nginx.xml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml index f4e403e4b449..f41151cd0905 100644 --- a/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml +++ b/dolphinscheduler-dist/src/main/assembly/dolphinscheduler-nginx.xml @@ -98,25 +98,24 @@ conf + + - ${basedir}/../dolphinscheduler-common/src/main/resources + ${basedir}/../dolphinscheduler-dao/src/main/resources **/*.properties **/*.xml **/*.json + **/*.yml conf + + + + - ${basedir}/../dolphinscheduler-common/src/main/resources/bin - - *.* - - 755 - bin - - - ${basedir}/../dolphinscheduler-dao/src/main/resources + ${basedir}/../dolphinscheduler-service/src/main/resources **/*.properties **/*.xml @@ -125,7 +124,8 @@ conf - + + ${basedir}/../dolphinscheduler-server/target/dolphinscheduler-server-${project.version} From a4c816d266f8c5175dd28b740e477cb3ba031247 Mon Sep 17 00:00:00 2001 From: muzhongjiang Date: Tue, 23 Jun 2020 18:47:04 +0800 Subject: [PATCH 2/3] add state (#3040) Co-authored-by: mzjnumber1@163.com --- sql/dolphinscheduler_mysql.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/dolphinscheduler_mysql.sql b/sql/dolphinscheduler_mysql.sql index a8fcc5156450..7fe151138065 100644 --- a/sql/dolphinscheduler_mysql.sql +++ b/sql/dolphinscheduler_mysql.sql @@ -815,4 +815,4 @@ INSERT INTO `t_ds_relation_user_alertgroup` VALUES ('1', '1', '1', '2018-11-29 1 -- ---------------------------- -- Records of t_ds_user -- ---------------------------- -INSERT INTO `t_ds_user` VALUES ('1', 'admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', 'xx', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22', null); +INSERT INTO `t_ds_user` VALUES ('1', 'admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', 'xxx@qq.com', 'xx', '0', '2018-03-27 15:48:50', '2018-10-24 17:40:22', null,1); From 2e20d0c10fd129be32b94edab29ec3bebbec7ff8 Mon Sep 17 00:00:00 2001 From: CalvinKirs Date: Tue, 23 Jun 2020 22:35:12 +0800 Subject: [PATCH 3/3] [BUG_FIX]fix multi-threaded tests error. (#3044) * fix test mock error * fix test mock error --- .../TaskPriorityQueueConsumerTest.java | 24 +++++++------------ 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java index 180688edd9ed..b2a48d4edd04 100644 --- a/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java +++ b/dolphinscheduler-server/src/test/java/org/apache/dolphinscheduler/server/master/consumer/TaskPriorityQueueConsumerTest.java @@ -75,9 +75,9 @@ public void init(){ tenant.setCreateTime(new Date()); tenant.setUpdateTime(new Date()); - Mockito.when(processService.getTenantForProcess(1,2)).thenReturn(tenant); + Mockito.doReturn(tenant).when(processService).getTenantForProcess(1,2); - Mockito.when(processService.queryUserQueueByProcessInstanceId(1)).thenReturn("default"); + Mockito.doReturn("default").when(processService).queryUserQueueByProcessInstanceId(1); } @@ -104,7 +104,7 @@ public void testSHELLTask() throws Exception { processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition); - Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); + Mockito.doReturn(taskInstance).when(processService).getTaskInstanceDetailByTaskId(1); taskPriorityQueue.put("2_1_2_1_default"); Thread.sleep(10000); @@ -133,8 +133,7 @@ public void testSQLTask() throws Exception { processDefinition.setUserId(2); processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition); - - Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); + Mockito.doReturn(taskInstance).when(processService).getTaskInstanceDetailByTaskId(1); taskPriorityQueue.put("2_1_2_1_default"); DataSource dataSource = new DataSource(); @@ -146,7 +145,7 @@ public void testSQLTask() throws Exception { dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); - Mockito.when(processService.findDataSourceById(1)).thenReturn(dataSource); + Mockito.doReturn(dataSource).when(processService).findDataSourceById(1); Thread.sleep(10000); } @@ -174,8 +173,7 @@ public void testDataxTask() throws Exception { processDefinition.setUserId(2); processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition); - - Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); + Mockito.doReturn(taskInstance).when(processService).getTaskInstanceDetailByTaskId(1); taskPriorityQueue.put("2_1_2_1_default"); @@ -188,9 +186,7 @@ public void testDataxTask() throws Exception { dataSource.setConnectionParams("{\"address\":\"jdbc:mysql://192.168.221.185:3306\",\"database\":\"dolphinscheduler_qiaozhanwei\",\"jdbcUrl\":\"jdbc:mysql://192.168.221.185:3306/dolphinscheduler_qiaozhanwei\",\"user\":\"root\",\"password\":\"root@123\"}"); dataSource.setCreateTime(new Date()); dataSource.setUpdateTime(new Date()); - - Mockito.when(processService.findDataSourceById(80)).thenReturn(dataSource); - + Mockito.doReturn(dataSource).when(processService).findDataSourceById(80); Thread.sleep(10000); } @@ -217,12 +213,10 @@ public void testSqoopTask() throws Exception { processDefinition.setUserId(2); processDefinition.setProjectId(1); taskInstance.setProcessDefine(processDefinition); - - Mockito.when(processService.getTaskInstanceDetailByTaskId(1)).thenReturn(taskInstance); + Mockito.doReturn(taskInstance).when(processService).getTaskInstanceDetailByTaskId(1); taskPriorityQueue.put("2_1_2_1_default"); - DataSource dataSource = new DataSource(); dataSource.setId(1); dataSource.setName("datax"); @@ -250,7 +244,7 @@ public void testTaskInstanceIsFinalState(){ taskInstance.setExecutorId(2); - Mockito.when( processService.findTaskInstanceById(1)).thenReturn(taskInstance); + Mockito.doReturn(taskInstance).when(processService).findTaskInstanceById(1); taskPriorityQueueConsumer.taskInstanceIsFinalState(1); }