|
|
@ -31,7 +31,6 @@ import org.apache.dolphinscheduler.server.zk.SpringZKServer; |
|
|
|
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; |
|
|
|
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; |
|
|
|
import org.apache.dolphinscheduler.service.process.ProcessService; |
|
|
|
import org.apache.dolphinscheduler.service.process.ProcessService; |
|
|
|
import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue; |
|
|
|
import org.apache.dolphinscheduler.service.queue.TaskPriorityQueue; |
|
|
|
import org.apache.dolphinscheduler.service.queue.TaskPriorityQueueImpl; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.service.zk.ZookeeperCachedOperator; |
|
|
|
import org.apache.dolphinscheduler.service.zk.ZookeeperCachedOperator; |
|
|
|
import org.apache.dolphinscheduler.service.zk.ZookeeperConfig; |
|
|
|
import org.apache.dolphinscheduler.service.zk.ZookeeperConfig; |
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.Before; |
|
|
@ -232,9 +231,7 @@ public class TaskPriorityQueueConsumerTest { |
|
|
|
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.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.setCreateTime(new Date()); |
|
|
|
dataSource.setUpdateTime(new Date()); |
|
|
|
dataSource.setUpdateTime(new Date()); |
|
|
|
|
|
|
|
Mockito.doReturn(dataSource).when(processService).findDataSourceById(1); |
|
|
|
Mockito.when(processService.findDataSourceById(1)).thenReturn(dataSource); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Thread.sleep(10000); |
|
|
|
Thread.sleep(10000); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|