Browse Source
* [BUG-#5678][Registry]fix registry init node miss (#5686) * [Improvement][UI] Update the update time after the user information is successfully modified (#5684) * improve edit the userinfo success, but the updatetime is not the latest. * Improved shell task execution result log information, adding process.waitFor() and process.exitValue() information to the original log (#5691) Co-authored-by: shenglm <shenglm840722@126.com> * [Feature-#5565][Master Worker-Server] Global Param passed by sense dependencies (#5603) * add globalParams new plan with varPool * add unit test * add python task varPoolParams Co-authored-by: wangxj <wangxj31> * Issue robot translation judgment changed to Chinese (#5694) Co-authored-by: chenxingchun <438044805@qq.com> * the update function should use post instead of get (#5703) * enhance form verify (#5696) * checkState only supports %s not {} (#5711) * [Fix-5701]When deleting a user, the accessToken associated with the user should also be deleted (#5697) * update * fix the codestyle error * fix the compile error * support rollback Co-authored-by: Kirs <acm_master@163.com> Co-authored-by: kyoty <echohlne@gmail.com> Co-authored-by: ji04xiaogang <ji04xiaogang@163.com> Co-authored-by: shenglm <shenglm840722@126.com> Co-authored-by: wangxj3 <857234426@qq.com> Co-authored-by: xingchun-chen <55787491+xingchun-chen@users.noreply.github.com> Co-authored-by: chenxingchun <438044805@qq.com> Co-authored-by: JinyLeeChina <297062848@qq.com>2.0.7-release
66 changed files with 738 additions and 460 deletions
@ -1 +0,0 @@
|
||||
Subproject commit 959b66feb4231b08e8251422ac6d469cdc03d140 |
@ -1,53 +0,0 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.server.worker.task; |
||||
|
||||
import org.apache.dolphinscheduler.service.bean.SpringApplicationContext; |
||||
|
||||
import org.junit.Before; |
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.powermock.core.classloader.annotations.PrepareForTest; |
||||
import org.powermock.modules.junit4.PowerMockRunner; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
@RunWith(PowerMockRunner.class) |
||||
@PrepareForTest({SpringApplicationContext.class}) |
||||
public class AbstractCommandExecutorTest { |
||||
|
||||
private static final Logger logger = LoggerFactory.getLogger(AbstractCommandExecutorTest.class); |
||||
|
||||
private ShellCommandExecutor shellCommandExecutor; |
||||
|
||||
@Before |
||||
public void before() throws Exception { |
||||
System.setProperty("log4j2.disable.jmx", Boolean.TRUE.toString()); |
||||
shellCommandExecutor = new ShellCommandExecutor(null); |
||||
} |
||||
|
||||
@Test |
||||
public void testSetTaskResultString() { |
||||
shellCommandExecutor.setTaskResultString("shellReturn"); |
||||
} |
||||
|
||||
@Test |
||||
public void testGetTaskResultString() { |
||||
logger.info(shellCommandExecutor.getTaskResultString()); |
||||
} |
||||
} |
@ -0,0 +1,77 @@
|
||||
/* |
||||
* Licensed to the Apache Software Foundation (ASF) under one or more |
||||
* contributor license agreements. See the NOTICE file distributed with |
||||
* this work for additional information regarding copyright ownership. |
||||
* The ASF licenses this file to You under the Apache License, Version 2.0 |
||||
* (the "License"); you may not use this file except in compliance with |
||||
* the License. You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package org.apache.dolphinscheduler.server.worker.task; |
||||
|
||||
import static org.junit.Assert.assertNotNull; |
||||
|
||||
import org.apache.dolphinscheduler.common.enums.DataType; |
||||
import org.apache.dolphinscheduler.common.enums.Direct; |
||||
import org.apache.dolphinscheduler.common.process.Property; |
||||
import org.apache.dolphinscheduler.common.task.shell.ShellParameters; |
||||
import org.apache.dolphinscheduler.common.task.sql.SqlParameters; |
||||
|
||||
import java.util.ArrayList; |
||||
import java.util.List; |
||||
|
||||
import org.junit.Test; |
||||
import org.junit.runner.RunWith; |
||||
import org.powermock.modules.junit4.PowerMockRunner; |
||||
import org.slf4j.Logger; |
||||
import org.slf4j.LoggerFactory; |
||||
|
||||
/** |
||||
* shell task return test. |
||||
*/ |
||||
@RunWith(PowerMockRunner.class) |
||||
public class TaskParamsTest { |
||||
private static final Logger logger = LoggerFactory.getLogger(TaskParamsTest.class); |
||||
|
||||
@Test |
||||
public void testDealOutParam() { |
||||
List<Property> properties = new ArrayList<>(); |
||||
Property property = new Property(); |
||||
property.setProp("test1"); |
||||
property.setDirect(Direct.OUT); |
||||
property.setType(DataType.VARCHAR); |
||||
property.setValue("test1"); |
||||
properties.add(property); |
||||
|
||||
ShellParameters shellParameters = new ShellParameters(); |
||||
String resultShell = "key1=value1$VarPoolkey2=value2"; |
||||
shellParameters.varPool = new ArrayList<>(); |
||||
shellParameters.setLocalParams(properties); |
||||
shellParameters.dealOutParam(resultShell); |
||||
assertNotNull(shellParameters.getVarPool().get(0)); |
||||
|
||||
String sqlResult = "[{\"id\":6,\"test1\":\"6\"},{\"id\":70002,\"test1\":\"+1\"}]"; |
||||
SqlParameters sqlParameters = new SqlParameters(); |
||||
String sqlResult1 = "[{\"id\":6,\"test1\":\"6\"}]"; |
||||
sqlParameters.setLocalParams(properties); |
||||
sqlParameters.varPool = new ArrayList<>(); |
||||
sqlParameters.dealOutParam(sqlResult1); |
||||
assertNotNull(sqlParameters.getVarPool().get(0)); |
||||
|
||||
property.setType(DataType.LIST); |
||||
properties.clear(); |
||||
properties.add(property); |
||||
sqlParameters.setLocalParams(properties); |
||||
sqlParameters.dealOutParam(sqlResult); |
||||
assertNotNull(sqlParameters.getVarPool().get(0)); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue