This is an automated email from the ASF dual-hosted git repository.

casion pushed a commit to branch dev-1.3.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.3.1 by this push:
     new fc206a487 feat: linkis-cli-application unit test add (#3818)
fc206a487 is described below

commit fc206a487e17b42596a0cff423a33a08fec80cca
Author: ruY <[email protected]>
AuthorDate: Sun Nov 13 21:37:37 2022 +0800

    feat: linkis-cli-application unit test add (#3818)
---
 .../application/constants/AppConstantsTest.java    | 58 +++++++++++++++++++
 .../cli/application/constants/AppKeysTest.java     | 65 ++++++++++++++++++++++
 .../application/constants/LinkisConstantsTest.java | 36 ++++++++++++
 .../cli/application/constants/LinkisKeysTest.java  | 61 ++++++++++++++++++++
 .../interactor/command/LinkisCmdTypeTest.java      | 38 +++++++++++++
 .../interactor/job/LinkisJobStatusTest.java        | 42 ++++++++++++++
 .../job/builder/ProcessKeyUtilsTest.java           | 42 ++++++++++++++
 .../job/subtype/LinkisManSubTypeTest.java          | 44 +++++++++++++++
 .../job/subtype/LinkisSubmitSubTypeTest.java       | 33 +++++++++++
 .../application/operator/OperatorUtilsTest.java    | 35 ++++++++++++
 .../operator/once/OnceJobConstantsTest.java        | 38 +++++++++++++
 .../operator/ujes/UJESConstantsTest.java           | 56 +++++++++++++++++++
 .../linkis/cli/application/utils/UtilsTest.java    | 34 +++++++++++
 13 files changed, 582 insertions(+)

diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/AppConstantsTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/AppConstantsTest.java
new file mode 100644
index 000000000..bb16d43e4
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/AppConstantsTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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.linkis.cli.application.constants;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class AppConstantsTest {
+
+  @Test
+  @DisplayName("constTest")
+  public void constTest() {
+
+    String defaultConfigName = AppConstants.DEFAULT_CONFIG_NAME;
+    Long jobQuerySleepMills = AppConstants.JOB_QUERY_SLEEP_MILLS;
+    String resultsetLogo = AppConstants.RESULTSET_LOGO;
+    String resultsetMetaBeginLogo = AppConstants.RESULTSET_META_BEGIN_LOGO;
+    String resultsetMetaEndLogo = AppConstants.RESULTSET_META_END_LOGO;
+    String resultsetSeparatorLogo = AppConstants.RESULTSET_SEPARATOR_LOGO;
+    Integer resultsetPageSize = AppConstants.RESULTSET_PAGE_SIZE;
+    String jobCreatorDefault = AppConstants.JOB_CREATOR_DEFAULT;
+    String jobCreatorAsyncDefault = AppConstants.JOB_CREATOR_ASYNC_DEFAULT;
+    String dummyCid = AppConstants.DUMMY_CID;
+    String linkisCli = AppConstants.LINKIS_CLI;
+    String ujesMode = AppConstants.UJES_MODE;
+    String onceMode = AppConstants.ONCE_MODE;
+
+    Assertions.assertEquals("linkis-cli.properties", defaultConfigName);
+    Assertions.assertTrue(2000L == jobQuerySleepMills.longValue());
+    Assertions.assertEquals("============ RESULT SET {0} ============", 
resultsetLogo);
+    Assertions.assertEquals("----------- META DATA ------------", 
resultsetMetaBeginLogo);
+    Assertions.assertEquals("------------ END OF META DATA ------------", 
resultsetMetaEndLogo);
+    Assertions.assertEquals("------------------------", 
resultsetSeparatorLogo);
+    Assertions.assertTrue(5000 == resultsetPageSize.intValue());
+    Assertions.assertEquals("LINKISCLI", jobCreatorDefault);
+    Assertions.assertEquals("LINKISCLIASYNC", jobCreatorAsyncDefault);
+    Assertions.assertEquals("dummy", dummyCid);
+    Assertions.assertEquals("LinkisCli", linkisCli);
+    Assertions.assertEquals("ujes", ujesMode);
+    Assertions.assertEquals("once", onceMode);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/AppKeysTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/AppKeysTest.java
new file mode 100644
index 000000000..f2477149b
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/AppKeysTest.java
@@ -0,0 +1,65 @@
+/*
+ * 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.linkis.cli.application.constants;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class AppKeysTest {
+
+  @Test
+  @DisplayName("constTest")
+  public void constTest() {
+
+    String adminUsers = AppKeys.ADMIN_USERS;
+    String linkisClientNoncustomizable = AppKeys.LINKIS_CLIENT_NONCUSTOMIZABLE;
+    String logPathKey = AppKeys.LOG_PATH_KEY;
+    String logFileKey = AppKeys.LOG_FILE_KEY;
+    String clientConfigRootKey = AppKeys.CLIENT_CONFIG_ROOT_KEY;
+    String defaultConfigFileNameKey = AppKeys.DEFAULT_CONFIG_FILE_NAME_KEY;
+    String linuxUserKey = AppKeys.LINUX_USER_KEY;
+    String jobExec = AppKeys.JOB_EXEC;
+    String jobExecCode = AppKeys.JOB_EXEC_CODE;
+    String jobContent = AppKeys.JOB_CONTENT;
+    String jobSource = AppKeys.JOB_SOURCE;
+    String jobParamConf = AppKeys.JOB_PARAM_CONF;
+    String jobParamRuntime = AppKeys.JOB_PARAM_RUNTIME;
+    String jobParamVar = AppKeys.JOB_PARAM_VAR;
+    String jobLabel = AppKeys.JOB_LABEL;
+
+    Assertions.assertEquals("hadoop,root,shangda", adminUsers);
+    Assertions.assertEquals("wds.linkis.client.noncustomizable", 
linkisClientNoncustomizable);
+    Assertions.assertEquals("log.path", logPathKey);
+    Assertions.assertEquals("log.file", logFileKey);
+    Assertions.assertEquals("conf.root", clientConfigRootKey);
+    Assertions.assertEquals("conf.file", defaultConfigFileNameKey);
+    Assertions.assertEquals("user.name", linuxUserKey);
+
+    Assertions.assertEquals("wds.linkis.client.exec", jobExec);
+    Assertions.assertEquals("wds.linkis.client.exec.code", jobExecCode);
+    Assertions.assertEquals("wds.linkis.client.jobContent", jobContent);
+    Assertions.assertEquals("wds.linkis.client.source", jobSource);
+
+    Assertions.assertEquals("wds.linkis.client.param.conf", jobParamConf);
+    Assertions.assertEquals("wds.linkis.client.param.runtime", 
jobParamRuntime);
+    Assertions.assertEquals("wds.linkis.client.param.var", jobParamVar);
+
+    Assertions.assertEquals("wds.linkis.client.label", jobLabel);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/LinkisConstantsTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/LinkisConstantsTest.java
new file mode 100644
index 000000000..486b95d6f
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/LinkisConstantsTest.java
@@ -0,0 +1,36 @@
+/*
+ * 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.linkis.cli.application.constants;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class LinkisConstantsTest {
+
+  @Test
+  @DisplayName("constTest")
+  public void constTest() {
+
+    String authStrategyStatic = LinkisConstants.AUTH_STRATEGY_STATIC;
+    String authStrategyToken = LinkisConstants.AUTH_STRATEGY_TOKEN;
+
+    Assertions.assertEquals("token", authStrategyToken);
+    Assertions.assertEquals("static", authStrategyStatic);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/LinkisKeysTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/LinkisKeysTest.java
new file mode 100644
index 000000000..e8c8f81b3
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/constants/LinkisKeysTest.java
@@ -0,0 +1,61 @@
+/*
+ * 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.linkis.cli.application.constants;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class LinkisKeysTest {
+
+  @Test
+  @DisplayName("constTest")
+  public void constTest() {
+
+    String keyCodetype = LinkisKeys.KEY_CODETYPE;
+    String keyCode = LinkisKeys.KEY_CODE;
+    String keyVars = LinkisKeys.KEY_VARS;
+    String keyConf = LinkisKeys.KEY_CONF;
+    String keyScriptPath = LinkisKeys.KEY_SCRIPT_PATH;
+    String keyEnginetype = LinkisKeys.KEY_ENGINETYPE;
+    String keyUserCreator = LinkisKeys.KEY_USER_CREATOR;
+    String keyErrorCode = LinkisKeys.KEY_ERROR_CODE;
+    String keyErrorDesc = LinkisKeys.KEY_ERROR_DESC;
+    String keyStrongerExecid = LinkisKeys.KEY_STRONGER_EXECID;
+    String keyRequestapp = LinkisKeys.KEY_REQUESTAPP;
+    String keyExecid = LinkisKeys.KEY_EXECID;
+    String keyUmuser = LinkisKeys.KEY_UMUSER;
+    String keyExecuteonce = LinkisKeys.KEY_EXECUTEONCE;
+
+    Assertions.assertEquals("codeType", keyCodetype);
+    Assertions.assertEquals("code", keyCode);
+    Assertions.assertEquals("variables", keyVars);
+    Assertions.assertEquals("configuration", keyConf);
+    Assertions.assertEquals("scriptPath", keyScriptPath);
+    Assertions.assertEquals("engineType", keyEnginetype);
+    Assertions.assertEquals("userCreator", keyUserCreator);
+    Assertions.assertEquals("errCode", keyErrorCode);
+    Assertions.assertEquals("errDesc", keyErrorDesc);
+    Assertions.assertEquals("strongerExecId", keyStrongerExecid);
+
+    Assertions.assertEquals("requestApplicationName", keyRequestapp);
+    Assertions.assertEquals("execId", keyExecid);
+    Assertions.assertEquals("umUser", keyUmuser);
+    Assertions.assertEquals("executeOnce", keyExecuteonce);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/command/LinkisCmdTypeTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/command/LinkisCmdTypeTest.java
new file mode 100644
index 000000000..16f47274d
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/command/LinkisCmdTypeTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.linkis.cli.application.interactor.command;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class LinkisCmdTypeTest {
+
+  @Test
+  @DisplayName("enumTest")
+  public void enumTest() {
+
+    int id = LinkisCmdType.UNIVERSAL.getId();
+    String name = LinkisCmdType.UNIVERSAL.getName();
+    String desc = LinkisCmdType.UNIVERSAL.getDesc();
+
+    Assertions.assertTrue(1 == id);
+    Assertions.assertEquals("linkis-cli", name);
+    Assertions.assertNotNull(desc);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/LinkisJobStatusTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/LinkisJobStatusTest.java
new file mode 100644
index 000000000..1b3b7c67e
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/LinkisJobStatusTest.java
@@ -0,0 +1,42 @@
+/*
+ * 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.linkis.cli.application.interactor.job;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class LinkisJobStatusTest {
+
+  @Test
+  @DisplayName("enumTest")
+  public void enumTest() {
+
+    boolean success = LinkisJobStatus.SUCCEED.isJobSuccess();
+    boolean jobFailure = LinkisJobStatus.FAILED.isJobFailure();
+    boolean jobCancelled = LinkisJobStatus.CANCELLED.isJobCancelled();
+    boolean jobTimeout = LinkisJobStatus.TIMEOUT.isJobTimeout();
+    boolean jobAbnormalStatus = LinkisJobStatus.UNKNOWN.isJobAbnormalStatus();
+
+    Assertions.assertTrue(success);
+    Assertions.assertTrue(jobFailure);
+    Assertions.assertTrue(jobCancelled);
+    Assertions.assertTrue(jobTimeout);
+    Assertions.assertTrue(jobAbnormalStatus);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/builder/ProcessKeyUtilsTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/builder/ProcessKeyUtilsTest.java
new file mode 100644
index 000000000..cc579bec1
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/builder/ProcessKeyUtilsTest.java
@@ -0,0 +1,42 @@
+/*
+ * 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.linkis.cli.application.interactor.job.builder;
+
+import org.apache.linkis.cli.application.constants.AppKeys;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class ProcessKeyUtilsTest {
+
+  @Test
+  @DisplayName("removePrefixForKeysInMapTest")
+  public void removePrefixForKeysInMapTest() {
+
+    Map<String, Object> map = new HashMap<>();
+    map.put(AppKeys.JOB_PARAM_CONF, new Object());
+    map.put("name", new Object());
+
+    Map<String, Object> stringObjectMap = 
ProcessKeyUtils.removePrefixForKeysInMap(map);
+    Assertions.assertTrue(1 == stringObjectMap.size());
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/subtype/LinkisManSubTypeTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/subtype/LinkisManSubTypeTest.java
new file mode 100644
index 000000000..699eaaf8b
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/subtype/LinkisManSubTypeTest.java
@@ -0,0 +1,44 @@
+/*
+ * 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.linkis.cli.application.interactor.job.subtype;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class LinkisManSubTypeTest {
+
+  @Test
+  @DisplayName("enumTest")
+  public void enumTest() {
+
+    String killName = LinkisManSubType.KILL.getName();
+    String logName = LinkisManSubType.LOG.getName();
+    String descName = LinkisManSubType.DESC.getName();
+    String statusName = LinkisManSubType.STATUS.getName();
+    String listName = LinkisManSubType.LIST.getName();
+    String resultName = LinkisManSubType.RESULT.getName();
+
+    Assertions.assertEquals("kill", killName);
+    Assertions.assertEquals("log", logName);
+    Assertions.assertEquals("desc", descName);
+    Assertions.assertEquals("status", statusName);
+    Assertions.assertEquals("list", listName);
+    Assertions.assertEquals("result", resultName);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/subtype/LinkisSubmitSubTypeTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/subtype/LinkisSubmitSubTypeTest.java
new file mode 100644
index 000000000..f05d59700
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/interactor/job/subtype/LinkisSubmitSubTypeTest.java
@@ -0,0 +1,33 @@
+/*
+ * 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.linkis.cli.application.interactor.job.subtype;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class LinkisSubmitSubTypeTest {
+
+  @Test
+  @DisplayName("enumTest")
+  public void enumTest() {
+
+    String submitName = LinkisSubmitSubType.SUBMIT.getName();
+    Assertions.assertEquals("submit", submitName);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/OperatorUtilsTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/OperatorUtilsTest.java
new file mode 100644
index 000000000..53dd35914
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/OperatorUtilsTest.java
@@ -0,0 +1,35 @@
+/*
+ * 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.linkis.cli.application.operator;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class OperatorUtilsTest {
+
+  @Test
+  @DisplayName("getNumOfLinesTest")
+  public void getNumOfLinesTest() {
+
+    String str = "name, \n" + "names";
+    int numOfLines = OperatorUtils.getNumOfLines(str);
+
+    Assertions.assertTrue(2 == numOfLines);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/once/OnceJobConstantsTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/once/OnceJobConstantsTest.java
new file mode 100644
index 000000000..067acf9e9
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/once/OnceJobConstantsTest.java
@@ -0,0 +1,38 @@
+/*
+ * 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.linkis.cli.application.operator.once;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class OnceJobConstantsTest {
+
+  @Test
+  @DisplayName("constTest")
+  public void constTest() {
+
+    Integer maxLogSizeOnce = OnceJobConstants.MAX_LOG_SIZE_ONCE;
+    Integer idxForLogTypeAll = OnceJobConstants.IDX_FOR_LOG_TYPE_ALL;
+    String logIgnoreKeywords = OnceJobConstants.LOG_IGNORE_KEYWORDS;
+
+    Assertions.assertTrue(5000 == maxLogSizeOnce.intValue());
+    Assertions.assertTrue(3 == idxForLogTypeAll.intValue());
+    Assertions.assertEquals("[SpringContextShutdownHook],[main]", 
logIgnoreKeywords);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/ujes/UJESConstantsTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/ujes/UJESConstantsTest.java
new file mode 100644
index 000000000..cf7615c30
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/operator/ujes/UJESConstantsTest.java
@@ -0,0 +1,56 @@
+/*
+ * 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.linkis.cli.application.operator.ujes;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class UJESConstantsTest {
+
+  @Test
+  @DisplayName("constTest")
+  public void constTest() {
+
+    int exceptionCheckAfterPage = UJESConstants.EXCEPTION_CHECK_AFTER_PAGE;
+
+    Long driverQuerySleepMills = UJESConstants.DRIVER_QUERY_SLEEP_MILLS;
+    Integer driverRequestMaxRetryTime = 
UJESConstants.DRIVER_REQUEST_MAX_RETRY_TIME;
+    Integer maxLogSize = UJESConstants.MAX_LOG_SIZE;
+    Integer idxForLogTypeAll = UJESConstants.IDX_FOR_LOG_TYPE_ALL;
+
+    String queryPageSizeName = UJESConstants.QUERY_PAGE_SIZE_NAME;
+    int queryPageSizeDefaultValue = 
UJESConstants.QUERY_PAGE_SIZE_DEFAULT_VALUE;
+    String queryStatusName = UJESConstants.QUERY_STATUS_NAME;
+    String queryStartDateMillsName = UJESConstants.QUERY_START_DATE_MILLS_NAME;
+    String queryEndDateMillsName = UJESConstants.QUERY_END_DATE_MILLS_NAME;
+    String queryPageNowName = UJESConstants.QUERY_PAGE_NOW_NAME;
+
+    Assertions.assertTrue(10000 == exceptionCheckAfterPage);
+    Assertions.assertTrue(500L == driverQuerySleepMills);
+    Assertions.assertTrue(3 == driverRequestMaxRetryTime.intValue());
+    Assertions.assertTrue(-1 == maxLogSize);
+    Assertions.assertTrue(3 == idxForLogTypeAll.intValue());
+    Assertions.assertEquals("pageSize", queryPageSizeName);
+    Assertions.assertTrue(100 == queryPageSizeDefaultValue);
+    Assertions.assertEquals("status", queryStatusName);
+    Assertions.assertEquals("startDateMills", queryStartDateMillsName);
+    Assertions.assertEquals("endDateMills", queryEndDateMillsName);
+    Assertions.assertEquals("pageNow", queryPageNowName);
+  }
+}
diff --git 
a/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/utils/UtilsTest.java
 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/utils/UtilsTest.java
new file mode 100644
index 000000000..5af0e6ab8
--- /dev/null
+++ 
b/linkis-computation-governance/linkis-client/linkis-cli/linkis-cli-application/src/test/java/org/apache/linkis/cli/application/utils/UtilsTest.java
@@ -0,0 +1,34 @@
+/*
+ * 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.linkis.cli.application.utils;
+
+import org.junit.jupiter.api.Assertions;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+
+public class UtilsTest {
+
+  @Test
+  @DisplayName("isValidExecIdTest")
+  public void isValidExecIdTest() {
+
+    String execId = "0001";
+    boolean validExecId = Utils.isValidExecId(execId);
+    Assertions.assertTrue(validExecId);
+  }
+}


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to