You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2022/02/22 10:13:03 UTC

[incubator-linkis-website] branch dev updated: Add PPMC members to open the GitHub warehouse permission of Apache (#155)

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

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


The following commit(s) were added to refs/heads/dev by this push:
     new 6c32279  Add PPMC members to open the GitHub warehouse permission of Apache (#155)
6c32279 is described below

commit 6c3227994460bdf37a85613b0725353e4a61e7a2
Author: husofskyzy <15...@163.com>
AuthorDate: Tue Feb 22 18:12:45 2022 +0800

    Add PPMC members to open the GitHub warehouse permission of Apache (#155)
    
    * Update how-to-sign-apache-icla.md
    * Create how-to-write-unit-test-code.md
---
 community/how-committer-binds-github-account.md    |  95 ++++++
 community/how-to-sign-apache-icla.md               |  61 ++++
 community/how-to-write-unit-test-code.md           | 338 +++++++++++++++++++++
 .../current/how-committer-binds-github-account.md  |  86 ++++++
 .../current/how-to-sign-apache-icla.md             |  60 ++++
 .../current/how-to-write-unit-test-code.md         |  78 +++--
 6 files changed, 689 insertions(+), 29 deletions(-)

diff --git a/community/how-committer-binds-github-account.md b/community/how-committer-binds-github-account.md
new file mode 100644
index 0000000..cfba602
--- /dev/null
+++ b/community/how-committer-binds-github-account.md
@@ -0,0 +1,95 @@
+---
+Title: PPMC members binds github account
+sidebar_ position: 2
+---
+
+## Process Overview
+1. Associate Apache account with GitHub account
+2. Open 2FA authentication for GitHub personal account
+3. Open permission application on gitbox
+## 1. Associate Apache ID with GitHub account
+### Mode 1
+Landing https://id.apache.org The [Your GitHub Username] field in LDAP is set to its own GitHub ID. Enter your password and click Submit changes. You will receive an invitation to join the organization of Apache organization on GitHub within four hours. Your GitHub account email should receive an email with the title "ASF gitbox".
+
+If the invitation has expired (7 days later), you can try both method 1 and method 2 again. See if you can receive the invitation email to join ASF org again in the email associated with the GitHub account (search "ASF gitbox").
+
+If you haven't received the invitation, try the following:
+1. Delete the GitHub accounts in methods 1 and 2 first;
+2. Wait for 1 scanning cycle (4 hours to be safe), and then add back the GitHub account;
+3. Then wait another 4 hours to see if the invitation email to join ASF org can be received again in the email associated with the GitHub account (search the email title "ASF gitbox").
+ 
+![Open-Apache's-GitHub-warehouse1](https://user-images.githubusercontent.com/29391030/153324492-cc4e4348-5e4b-450f-a23f-6c208e1a26fb.png)
+
+### Mode 2
+visit https://whimsy.apache.org/roster/committer/xxx (replace with your Apache ID) modify the corresponding data, and you will receive an invitation to join Apache's GitHub organization within four hours.
+
+Check the invitation email of GitHub organization that invites you to join Apache. The invitation is valid for 7 days
+
+![open-Apache's-GitHub-warehouse2]( https://user-images.githubusercontent.com/29391030/153324641-351cf239-c0ff-4fa6-a9f9-46991d4b11fd.png )
+
+After successful invitation, you can see that the organization you belong to has Apache based on your GitHub account information
+
+![open-Apache's-GitHub-warehouse3]( https://user-images.githubusercontent.com/29391030/153324664-6633b5be-a5b5-400a-b9db-685c4eeab8ad.png )
+
+## 2. Enable 2FA authentication (login token) for GitHub personal account
+Two factor authentication (2FA) refers to the method of authenticating users by combining password and physical conditions (credit card, SMS mobile phone, token or fingerprint and other biometrics). To ensure the security of the submitter's account, we need you to enable 2FA on GitHub to authenticate the login user and contribute code. Refer to 2FA for details.
+
+You need to install TOTP software on the mobile phone, search TOTP in the application market (Microsoft authenticator can be used for Android), and IOS Apple mobile phone recommends downloading authy token software, which can be bound to the mobile phone for cloud backup. SMS is also supported, but the GitHub configuration page has no Chinese mobile number + 86 to choose from by default. See the front-end code when you need to modify the configuration https://www.programmerall.com/articl [...]
+
+Step1 visit the personal account security setting page https://github.com/settings/security Select the fourth item [account security]
+
+![open-Apache's-GitHub-warehouse4]( https://user-images.githubusercontent.com/29391030/153325044-4b68a5c0-959a-4077-abdf-5ad5e67aa26a.png )
+
+Step2 select [set up using an app] next
+
+![open-Apache's-GitHub-warehouse5]( https://user-images.githubusercontent.com/29391030/153325063-ea61ad8c-cbbc-4053-8a37-35d315dc3b00.png )
+
+Step3 enters the QR code binding page, scans the code using the TOTP type app with the download number in advance, and enters the 6 displayed on the mobile terminal as the token
+
+![open-Apache's-GitHub-warehouse6]( https://user-images.githubusercontent.com/29391030/153325084-b57d3647-a6a5-4e15-9e9c-3c2f632c0655.png )
+
+Step4 download recover codes, then enter the success page and click Done to bind successfully
+
+![open-Apache's-GitHub-warehouse7]( https://user-images.githubusercontent.com/29391030/153325124-a523bd8c-f6d5-44ce-8372-3804d9c693c6.png )
+
+be careful
+
+When 2FA authentication is enabled, you need to use the user name / password + Mobile authentication code to log in to GitHub.
+
+When 2FA authentication is enabled, a private access token needs to be generated for git submission and other operations. At this time, you will use the user name + private access token to submit the code instead of the user name + password (subsequent on-demand configuration).
+
+For specific operations, please refer to creating a private token.
+
+If 2FA is subsequently closed, it will be removed from the project and will not be able to access our warehouse and fork warehouse from our private warehouse.
+
+##3. Open permission application on gitbox
+
+Step1 access https://gitbox.apache.org/setup/ Authorize associated Apache account
+
+![open-Apache's-GitHub-warehouse8]( https://user-images.githubusercontent.com/29391030/153325227-f917e9c3-16ea-42d4-8432-4b63fd5849da.png )
+
+Step 2 authorized associated GitHub account
+
+![open-Apache's-GitHub-warehouse9]( https://user-images.githubusercontent.com/29391030/153325245-e2eea319-278f-4254-afb8-7e1ec418f004.png )
+
+Step3 MFA status verification
+
+![open-Apache's-GitHub-warehouse10]( https://user-images.githubusercontent.com/29391030/153325267-71761576-9467-49a1-809b-2a5c0fc1a681.png )
+
+be careful
+
+After successful execution, see the figure below. Write permission will be enabled within about an hour after success. If the MFA status prompts "user not a member of the ASF GitHub organization. Please make sure you are a part of the ASF organization on GitHub and have 2FA enabled. Visit id.apache.org and set your GitHub ID to be invited to the org." Please check whether [associate Apache and GitHub account] is completed / whether 2FA is enabled. If it is normal, please verify it later  [...]
+
+![open-Apache's-GitHub-warehouse11]( https://user-images.githubusercontent.com/29391030/153325293-654c1cd4-7b2c-44be-94b0-9520e2ea05c1.png )
+
+##4. Other linked documents
+
+[GitHub uses TOTP to enable 2FA authentication] https://docs.github.com/cn/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication
+
+[create private token] https://docs.github.com/cn/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
+
+[introduction to gitbox] https://gitbox.apache.org
+
+[Apache and GitHub] https://infra.apache.org/apache-github.html
+
+[git github &amp;gitbox] https://cwiki.apache.org/confluence/display/INFRA/Git%2C +GitHub+and+Gitbox
diff --git a/community/how-to-sign-apache-icla.md b/community/how-to-sign-apache-icla.md
new file mode 100644
index 0000000..61c3e1e
--- /dev/null
+++ b/community/how-to-sign-apache-icla.md
@@ -0,0 +1,61 @@
+---
+title: Apache icla signing process
+sidebar_position: 2
+---
+
+## Apache Sign ICLA Guide {#apache-sign-icla-guide}
+Note: This article refers to the Apache icla signing process guide document of the incubator-shenyu-website project https://github.com/apache/incubator-shenyu-website/edit/main/community/9-icla.md
+
+Apache CLA short for Apache Contributor License Agreement, the purpose of this agreement is to clearly define the terms under which intellectual property has been contributed to the ASF and thereby allow us to defend the project should there be a legal dispute regarding the software at some future time.
+A signed ICLA is required to be on file before an individual is given commit rights to any ASF project.
+
+The process of submitting ICLA are:
+
+**1. First, click the link [Apache Licenses](https://www.apache.org/licenses/#clas) and find CLAs under the Contributor License Agreements section.**
+
+![page_link](https://user-images.githubusercontent.com/29391030/153529738-96f3f75a-41e5-4947-b290-c4ea29b101f1.png)
+
+**2. At the top of the page, there are two download links choose ICLA(Individual Contributor License Agreement) and download it.**
+
+![download](https://user-images.githubusercontent.com/29391030/153529788-a874aab9-786b-4131-a388-c0b5e31bdb8a.png)
+
+**3. Open the PDF, and fill in the following columns in English.**
+
+> To be noticed:
+> - Leave a space between family name and last name, remember capitalize the first letter, please write family name at first.
+> - Preferred Apache id(s) is a required field for committers.
+
+![information](https://user-images.githubusercontent.com/29391030/153529823-791977ec-6f8a-42fb-80e6-73c60ab58191.png)
+
+**4. The signature at the bottom of the document:**
+Apache only accept hand-written signature or [PDF signature software](https://pdf.yozocloud.cn/p/pdfaddsign)
+
+![sign](https://user-images.githubusercontent.com/29391030/153529853-e6869cd4-7193-4403-8ebe-3d5b65e1d310.png)
+
+**5.After signing, send the icla.pdf command as `username-icla.pdf` to the email address provided by the instructor**
+
+**6.After the email is sent successfully, Apache ShenYu official community informs**
+
+## Manual signature and PDF software signature Demo {#manual-signature-and-pdf-software-signature-demo}
+
+> PDF online signature
+> - Download the PDF source file
+> - Fill in items and personal information
+> - Open PDF and sign URL online
+> - Signature
+> - Save and download signed pdf fils
+> - Send to the specified mailbox
+> - Update graphite [icla signature status document]( https://shimo.im/sheets/rPqtJcWPDPV9wWPd/MODOC/ Icla signing status table, which can be copied and opened with graphite document app or applet)
+
+> Handwritten signature
+> - Download the PDF source file
+> - Fill in items and personal information
+> - Print documents
+> - Handwritten signature
+> - Convert photos into **single pdf** file
+> - Send to the specified mailbox
+> - Update graphite [icla signature status document]( https://shimo.im/sheets/rPqtJcWPDPV9wWPd/MODOC/ Icla signing status table, which can be copied and opened with graphite document app or applet)
+
+![doc_example](https://user-images.githubusercontent.com/29391030/153530035-cf22ddd4-6327-4afd-92ae-d37a610ddbfc.png)
+
+![doc_content](https://user-images.githubusercontent.com/29391030/153530048-ab95f6be-4e05-4600-b656-74efa2fa332e.png)
diff --git a/community/how-to-write-unit-test-code.md b/community/how-to-write-unit-test-code.md
new file mode 100644
index 0000000..4fa6cb6
--- /dev/null
+++ b/community/how-to-write-unit-test-code.md
@@ -0,0 +1,338 @@
+---
+Title: how to write unit test code
+sidebar_ position: 3
+---
+
+## 0 frame selection
+
+Junit5 + mockito + Jacobo + H2 local database
+
+Idea enhancement plugin  
+
+- JUnitGenerator V2. 0 standard module for generating test cases
+- Create the allnewset object and set the default value for allnewset
+- The association mapping between mybatisx ADO and mapper is easy to view
+
+controller service
+
+### Configure the template of JUnit in idea
+
+```properties
+
+######################################################################################## 
+## 
+## Available variables: 
+##         $entryList.methodList - List of method composites 
+##         $entryList.privateMethodList - List of private method composites 
+##         $entryList.fieldList - ArrayList of class scope field names 
+##         $entryList.className - class name 
+##         $entryList.packageName - package name 
+##         $today - Todays date in MM/dd/yyyy format 
+## 
+##            MethodComposite variables: 
+##                $method.name - Method Name 
+##                $method.signature - Full method signature in String form 
+##                $method.reflectionCode - list of strings representing commented out reflection code to access method (Private Methods) 
+##                $method.paramNames - List of Strings representing the method's parameters' names 
+##                $method.paramClasses - List of Strings representing the method's parameters' classes 
+## 
+## You can configure the output class name using "testClass" variable below. 
+## Here are some examples: 
+## Test${entry.ClassName} - will produce TestSomeClass 
+## ${entry.className}Test - will produce SomeClassTest 
+## 
+######################################################################################## 
+## 
+## title case 
+#macro (cap $strIn)$strIn.valueOf($strIn.charAt(0)).toUpperCase()$strIn.substring(1)#end 
+## Initial lowercase custom down
+#macro (down $strIn)$strIn.valueOf($strIn.charAt(0)).toLowerCase()$strIn.substring(1)#end
+## Iterate through the list and generate testcase for every entry. 
+#foreach ($entry in $entryList) 
+#set( $testClass="${entry.className}Test") 
+## 
+package $entry.packageName; 
+ 
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.springframework.beans.factory.annotation.Autowired;
+
+/** 
+ * ${entry.className} Tester
+*/ 
+public class $testClass { 
+ 
+    @Autowired
+    private ${entry.className} #down(${entry.className});
+ 
+    @BeforeEach
+    @DisplayName("Each unit test method is executed once before execution")
+    public void before() throws Exception {
+    }
+ 
+    @AfterEach
+    @DisplayName("Each unit test method is executed once before execution")
+    public void after() throws Exception {
+    }
+ 
+#foreach($method in $entry.methodList) 
+ 
+    @Test
+    @DisplayName("Method description: ...")
+    public void test#cap(${method.name})() throws Exception { 
+        //TODO: Test goes here... 
+    } 
+ 
+#end 
+ 
+#foreach($method in $entry.privateMethodList) 
+
+    @Test
+    @DisplayName("Method description: ...")
+    public void test#cap(${method.name})() throws Exception { 
+        //TODO: Test goes here... 
+    #foreach($string in $method.reflectionCode) 
+    $string 
+    #end 
+    } 
+ 
+#end 
+} 
+#end
+
+```
+
+![test-0]( https://user-images.githubusercontent.com/29391030/155080741-7e6b89db-0ee6-48e1-a858-4123d5bbf2f0.png )
+
+1. Configure test class generation path  
+
+   Original configuration: ${sourcepath}/test/${package}/${filename}  
+   Modified configuration: ${sourcepath}/..//test/java/${PACKAGE}/${FILENAME}  
+
+   As shown in the figure:  
+   ![test-1]( https://user-images.githubusercontent.com/29391030/155080336-476feba6-2790-43b5-a572-ee0aa6a9586f.png )
+
+2. Select class -> right click -> generate -> JUnit test to generate a test class
+
+   ![test-2]( https://user-images.githubusercontent.com/29391030/155080650-4fa68c66-5d7c-4e9f-ba63-0c7fc62d9df2.png )
+
+
+
+## 1 unit test criteria
+
+### 1.1 catalogue and naming criteria
+
+- 1. Unit test code directory
+     It must be written in the following project directory: src/test/java. It is not allowed to write in the business code directory.  
+     Note: this directory will be skipped during source code compilation, while the unit test framework scans this directory by default. The test configuration file must be placed under the src/test/resources file
+
+- 2. The package name of the test class should be consistent with the package name of the tested class  
+     Example:  
+     Business class: src/main/java/org/apache/linkis/jobhistory/dao/JobDetailMapper.java  
+     Corresponding test class:src/main/java/org/apache/linkis/jobhistory/dao/JobDetailMapperTest java  
+
+- 3. Naming and definition specification of test class: use test as the suffix of class name  
+     The test class is named as follows:  
+     Tested business + test, tested interface + test, tested class + test  
+
+- 4. Specification for naming and defining test cases: use test as the prefix of method names
+     The naming rule of test cases is: test + method name. Avoid using names that have no meaning in test1 and test2. Secondly, necessary function and method annotations are required.
+
+### 1.2 preparation criteria
+
+- 1. System is not allowed to be used in unit test Out for human flesh verification, or if judgment for verification (log can be used for Key log output). Assertion assert must be used for verification.
+
+- 2. Maintain the independence of unit testing. In order to ensure that unit tests are stable, reliable and easy to maintain, unit test cases must not call each other or rely on the order of execution.
+     Counterexample: method2 needs to rely on the execution of method1 and take the execution result as the input of method2
+
+- 3. Unit tests must be repeatable and not affected by the external environment.  
+     Note: unit tests are usually put into continuous integration. Unit tests will be executed every time there is code check in. If the single test depends on the external environment (network, service, middleware, etc.), it is easy to lead to the unavailability of the continuous integration mechanism.  
+     Positive example: in order not to be affected by the external environment, it is required to change the relevant dependencies of the tested class into injection when designing the code, and inject a local (memory) implementation or mock implementation with a dependency injection framework such as spring during testing.
+
+- 4. Incremental code ensures that the unit test passes.
+     Note: the new code must supplement the unit test. If the new code affects the original unit test, please correct it
+
+- 5. For unit testing, it is necessary to ensure that the test granularity is small enough to help accurately locate the problem. Single test granularity is generally at the method level (very few scenarios such as tool classes or enumeration classes can be at the class level).  
+     Note: only with small test granularity can we locate the error location as soon as possible. Single test is not responsible for checking cross class or cross system interaction logic, which is the field of integration testing.
+
+## 2 use of assertions    
+
+    The result verification of all test cases must use the assertion pattern     
+        use Assertions.assertEquals
+        Assertions.assertEquals(expectedJobDetail, actualJobDetail)
+        
+    The assertions assertion of junit5 is preferred, and the assertions of assertij are allowed in very few scenarios    
+        Comparison of objects before/after updating common scene databases
+        Asserting the usingrecursive comparison pattern using assertj's assertThat
+        Assertions.assertThat(actualObject).usingRecursiveComparison().isEqualTo(expectedObject);
+
+
+### 2.1 junit5 general assertion
+
+| Method | description    | remarks |
+|--------|-------------|-------------|
+|Assertequals | judge whether two objects or two original types are equal|        | 
+|Assertnotequals | judge whether two objects or two original types are not equal|        | 
+|Asserttrue | judge whether the given Boolean value is true|        | 
+|Assertfalse | judge whether the given Boolean value is false|        | 
+|AssertNull | judge whether the given object reference is null|        | 
+|AssertNotNull | judge whether the given object reference is not null|        | 
+|Assert all | multiple judgment logics are processed together. As long as one error is reported, the overall test will fail|        | 
+
+### 2.2 junit5 combined assertion and exception assertion
+
+**Composite assertion**
+The assertall method can process multiple judgment logics together. As long as one error is reported, the overall test will fail:
+  ```java
+    @Test
+    @DisplayName("assert all")
+    public void all() {
+    //Multiple judgments are executed together. Only when all judgments are passed can they be considered as passed
+     assertAll("Math",
+        () -> assertEquals(2, 1 + 1),
+        () -> assertTrue(1 > 0)
+     );
+    }
+  ```
+
+**Exception assertion**
+
+Assertions. The assertthrows method is used to test whether the executable instance throws an exception of the specified type when executing the execute method;    
+If the execute method does not throw an exception during execution, or the exception thrown is inconsistent with the expected type, the test will fail;    
+Example:  
+
+  ```java
+    @Test
+    @DisplayName("Assertion of exception")
+    void exceptionTesting() {
+        // When the execute method is executed, if an exception is thrown and the type of the exception is the first parameter of assertthrows (here is arithmeticexception. Class)
+        // The return value is an instance of an exception
+        Exception exception = assertThrows(ArithmeticException.class, () -> Math.floorDiv(1,0));
+        log.info("assertThrows pass,return instance:{}", exception.getMessage());
+    }
+  ```
+
+### 2.3 assertion usage criteria
+
+**Object instance equality assertion**
+
+1. Is it the same object instance
+
+```html
+Use junitd's assertions assertEquals
+Assertions.assertEquals(expectedJobDetail, actualJobDetail)
+```
+
+Not the same instance, but whether the attribute values of the comparison instance are exactly equal  
+AssertJ
+
+```html
+Comparison of objects before/after updating common scene databases
+Asserting the usingrecursive comparison pattern using assertj's assertthat
+Assertions. assertThat(actualObject). usingRecursiveComparison(). isEqualTo(expectedObject);
+```
+
+2. Assertion of set results such as list
+The size of the result set needs to be asserted
+Scope or specific size
+Each object in the result set needs assertion, which is recommended to be used in combination with the predicate of stream mode
+Example:
+
+```java
+ArrayList<JobRespProtocol> jobRespProtocolArrayList=service. batchChange(jobDetailReqBatchUpdate);
+//List is matched with the predicate of stream for assertion judgment
+Predicate<JobRespProtocol> statusPrecate = e -> e.getStatus()==0;
+assertEquals(2, jobRespProtocolArrayList.size());
+assertTrue(jobRespProtocolArrayList.stream(). anyMatch(statusPrecate));
+```
+
+## 3. Compilation of unit test
+
+### Class division
+
+It can be roughly classified according to the major functions of the class
+
+-The controller of the HTTP service provided by the controller cooperates with mockmvc for unit testing
+-Service layer of service business logic code
+-Dao and Dao layer of database operation
+-Util tool function class is a common function tool
+-Exception class is a custom exception class
+-Enum class
+-Entity class is used for DB interaction and parameter VO object and other entity classes processed by methods (if there are other user-defined functions besides normal get set, unit test is required)
+
+
+### 3.1 unit test of controller class
+Using mockmvc
+
+It mainly verifies the requestmethod method of interface request, basic parameters and expected return results.  
+Main scenarios: scenarios with and without unnecessary parameters are abnormal  
+
+```java
+ @Test
+    public void testList() throws Exception {
+        //Bring unnecessary parameters
+        MultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
+        paramsMap.add("startDate", String.valueOf(System.currentTimeMillis()));
+        MvcResult mvcResult = mockMvc.perform(get("/jobhistory/list")
+                .params(paramsMap))
+                .andExpect(status().isOk())
+                .andExpect(content().contentType(MediaType.APPLICATION_JSON))
+                .andReturn();
+
+        Message res = JsonUtils.jackson().readValue(mvcResult.getResponse().getContentAsString(), Message.class);
+        assertEquals(res.getStatus(), MessageStatus.SUCCESS());
+        logger.info(mvcResult.getResponse().getContentAsString());
+
+        //Without unnecessary parameters
+        mvcResult = mockMvc.perform(get("/jobhistory/list"))
+                .andExpect(status().isOk())
+                .andExpect(content().contentType(MediaType.APPLICATION_JSON))
+                .andReturn();
+
+        res = JsonUtils.jackson().readValue(mvcResult.getResponse().getContentAsString(), Message.class);
+        assertEquals(res.getStatus(), MessageStatus.SUCCESS());
+
+        logger.info(mvcResult.getResponse().getContentAsString());
+    }
+
+``` 
+
+### 3.2 unit test of server class
+
+### 3.3 unit test of Dao class
+
+Use H2 database, application. In the configuration file In properties, you need to configure the basic information of H2 database and the relevant path information of mybatis  
+
+```properties
+#h2数据库配置
+spring.datasource.driver-class-name=org.h2.Driver
+#连接以及初始化表的脚本
+spring.datasource.url=jdbc:h2:mem:test;MODE=MySQL;DB_CLOSE_DELAY=-1;DATABASE_TO_LOWER=true;INIT=runscript from 'classpath:create.sql'
+spring.datasource.username=sa
+spring.datasource.password=
+spring.datasource.hikari.connection-test-query=select 1
+spring.datasource.hikari.minimum-idle=5
+spring.datasource.hikari.auto-commit=true
+spring.datasource.hikari.validation-timeout=3000
+spring.datasource.hikari.pool-name=linkis-test
+spring.datasource.hikari.maximum-pool-size=50
+spring.datasource.hikari.connection-timeout=30000
+spring.datasource.hikari.idle-timeout=600000
+spring.datasource.hikari.leak-detection-threshold=0
+spring.datasource.hikari.initialization-fail-timeout=1
+
+#配置mybatis-plus的mapper信息 因为使用的是mybatis-plus,使用mybatis-plus
+mybatis-plus.mapper-locations=classpath:org/apache/linkis/jobhistory/dao/impl/JobDetailMapper.xml,classpath:org/apache/linkis/jobhistory/dao/impl/JobHistoryMapper.xml
+mybatis-plus.type-aliases-package=org.apache.linkis.jobhistory.entity
+mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
+```
+
+List is configured with predicate of stream to make assertion judgment and write specification
+
+1. Use @Transactional and @Rollback to realize data rollback and avoid data pollution
+2. Each DaoTest should have a public method for creating and initializing data (or the way of importing data CSV) to prepare data. For related queries, updates, deletions and other operations, the public method should be called first to prepare data
+3. Create test data. If an attribute value is a self increasing ID, it should not be assigned
+4. The test data created shall be consistent with the actual sample data as far as possible
+5. When updating the data test, if the field allows, please prefix it with 'modify original value'
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-committer-binds-github-account.md b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-committer-binds-github-account.md
new file mode 100644
index 0000000..24e9e33
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-committer-binds-github-account.md
@@ -0,0 +1,86 @@
+---
+title: PPMC成员开通Apache的github仓库权限
+sidebar_position: 2
+---
+
+## 流程总览
+1. 关联apache账号与github账号
+2. github个人账号安全开启2FA认证
+3. gitbox上开启权限申请
+
+## 1、关联apache Id与github账号
+### 方式1 
+登陆  https://id.apache.org LDAP中的[Your GitHub Username]字段设置为自己的 GitHub ID。输入密码 点击submit changes 四小时内会收到邀请加入github 上apache organization 的组织的邀约。您的github 账号邮箱,应该会收到一封标题包含“asf-gitbox”的邮件。
+如邀约已过期(7天过期),可以尝试把方式1、方式2都再尝试一下。看看github 账号关联邮箱中,能否重新收到加入ASF org 的邀约邮件(搜索"asf-gitbox")。
+如还未收到邀约,可尝试如下:
+1. 把方式1、2中的github账号先都删掉;
+2. 等待1个扫描周期后(稳妥起见可等4个小时),再重新把github 账号加回去;
+3. 然后再等4小时,看看github 账号关联邮箱中,能否重新收到加入ASF org 的邀约邮件(搜索邮件标题"asf-gitbox")。
+
+![Open-Apache's-GitHub-warehouse1](https://user-images.githubusercontent.com/29391030/153324492-cc4e4348-5e4b-450f-a23f-6c208e1a26fb.png)
+
+### 方式2 
+访问https://whimsy.apache.org/roster/committer/xxx (替换成你的apache id)  修改对应的数据,四小时内会收到邀请加入apache的github组织的邀约。
+注意查收邀请加入apache的github组织的邀约邮件。邀约有效期是7天
+
+![open-Apache's-GitHub-warehouse2](https://user-images.githubusercontent.com/29391030/153324641-351cf239-c0ff-4fa6-a9f9-46991d4b11fd.png)
+
+成功邀约后 个人github账户信息可以看到归属组织有了apache 
+
+![open-Apache's-GitHub-warehouse3](https://user-images.githubusercontent.com/29391030/153324664-6633b5be-a5b5-400a-b9db-685c4eeab8ad.png)
+
+## 2、github个人账号安全 开启2FA认证(登陆令牌)
+双因子验证(2FA)是指结合密码以及实物(信用卡、SMS手机、令牌或指纹等生物标志)两种条件对用户进行认证的方法。 为保证提交者账户的安全,我们需要您在GitHub上启用2FA来验证登录用户、并贡献代码。具体内容可参考2FA。
+需在手机端安装TOTP 软件,应用市场搜索TOTP(安卓可用Microsoft Authenticator),ios苹果手机个人推荐下载authy令牌软件 绑定手机可云端备份。手机短信也支持 但是github配置页面默认没有中国地区手机号+86可以选择,需要修改配置时的前端代码绕过见https://www.programmerall.com/article/5457100195/ 。
+
+step1 访问个人账号安全设置页面 https://github.com/settings/security 选择第四项[Account security]
+
+![open-Apache's-GitHub-warehouse4](https://user-images.githubusercontent.com/29391030/153325044-4b68a5c0-959a-4077-abdf-5ad5e67aa26a.png)
+
+step2 选择【Set up using an app】 下一步
+
+![open-Apache's-GitHub-warehouse5](https://user-images.githubusercontent.com/29391030/153325063-ea61ad8c-cbbc-4053-8a37-35d315dc3b00.png)
+
+step3 进入二维码绑定页面,使用事先下载号的totp类型app 扫码,录入手机端显示的6为令牌
+
+![open-Apache's-GitHub-warehouse6](https://user-images.githubusercontent.com/29391030/153325084-b57d3647-a6a5-4e15-9e9c-3c2f632c0655.png)
+
+step4 下载recover codes ,然后进入成功页面 点击done 绑定成功
+
+![open-Apache's-GitHub-warehouse7](https://user-images.githubusercontent.com/29391030/153325124-a523bd8c-f6d5-44ce-8372-3804d9c693c6.png)
+
+注意
+当开启2FA验证后,需要使用用户名/密码 + 手机认证码的方式来登录GitHub。
+当启用2FA认证后,需要生成私有访问Token来进行git提交等操作。此时,您将使用用户名 + 私有访问Token 来代替 用户名 + 密码的方式 进行代码的提交(后续按需配置)。
+具体操作,请参考创建私有Token。
+
+若后续关闭2FA,将会从本项目中除名,并且无法访问我们的仓库以及来自我们私有仓库的fork仓库。
+
+## 3、gitbox上开启权限申请
+step1 访问 https://gitbox.apache.org/setup/ 授权关联apache账号 
+
+![open-Apache's-GitHub-warehouse8](https://user-images.githubusercontent.com/29391030/153325227-f917e9c3-16ea-42d4-8432-4b63fd5849da.png)
+
+step 2  授权关联github账号
+
+![open-Apache's-GitHub-warehouse9](https://user-images.githubusercontent.com/29391030/153325245-e2eea319-278f-4254-afb8-7e1ec418f004.png)
+
+step3 mfa status校验
+
+![open-Apache's-GitHub-warehouse10](https://user-images.githubusercontent.com/29391030/153325267-71761576-9467-49a1-809b-2a5c0fc1a681.png)
+
+注意
+执行成功后如下图。成功后大概一小时内会开通写权限。如果MFA Status 提示“User not a member of the ASF GitHub organisation. Please make sure you are a part of the ASF Organisation on GitHub and have 2FA enabled. Visit id.apache.org and set your GitHub ID to be invited to the org.” 请检查【关联apache与github账号】是否完成/2FA是否开启,如都正常请稍后在进行验证,因为新成员获取 MFA 状态有延迟。
+
+![open-Apache's-GitHub-warehouse11](https://user-images.githubusercontent.com/29391030/153325293-654c1cd4-7b2c-44be-94b0-9520e2ea05c1.png)
+
+## 4、其他链接文档
+【github使用TOTP启用2FA认证】 https://docs.github.com/cn/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication
+
+【创建私有Token】   https://docs.github.com/cn/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token
+
+【gitbox 介绍】          https://gitbox.apache.org
+
+【apache 和github】  https://infra.apache.org/apache-github.html
+
+【git github &gitbox 】https://cwiki.apache.org/confluence/display/INFRA/Git%2C+GitHub+and+Gitbox
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-sign-apache-icla.md b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-sign-apache-icla.md
new file mode 100644
index 0000000..acba9c7
--- /dev/null
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-sign-apache-icla.md
@@ -0,0 +1,60 @@
+---
+title: Apache ICLA 签署流程
+sidebar_position: 2
+---
+
+## Apache ICLA 签署流程指南
+注:本文参考 incubator-shenyu-website项目的Apache ICLA 签署流程指南文档 https://github.com/apache/incubator-shenyu-website/edit/main/i18n/zh/docusaurus-plugin-content-docs-community/current/9-icla.md
+
+Apache CLA 全称 Apache Contributor License Agreement,签署ICLA的目的是定义向ASF贡献的文档,保护知识产权,避免后续法律纠纷。ICLA在官方存档后生效,贡献者方可参与Apache项目。
+
+当我们需要签署ICLA时步骤如下:
+
+**1. 打开链接 [官网Licenses](https://www.apache.org/licenses/#clas) 在Contributor License Agreements 下找到CLAs并进入页面。**
+
+![page_link](https://user-images.githubusercontent.com/29391030/153529738-96f3f75a-41e5-4947-b290-c4ea29b101f1.png)
+
+**2. 在页面上方我们可以看到两个下载链接,选择ICLA(个人CLA)并下载文件。**
+
+![download](https://user-images.githubusercontent.com/29391030/153529788-a874aab9-786b-4131-a388-c0b5e31bdb8a.png)
+
+**3. 打开PDF,ICLA需要填写的是两个部分,均需要全英文填写。**
+
+> 注意事项:
+> - 姓名需要填写拼音,姓与名之间空一格,首字母均为大写,名在前姓氏在后。
+> - Committer相关的签署,则preferred Apache id(s)是必填项。
+
+![information](https://user-images.githubusercontent.com/29391030/153529823-791977ec-6f8a-42fb-80e6-73c60ab58191.png)
+
+**4.文件最下方的署名。** 官网支持手写或者[PDF签名软件](https://pdf.yozocloud.cn/p/pdfaddsign)
+
+![sign](https://user-images.githubusercontent.com/29391030/153529853-e6869cd4-7193-4403-8ebe-3d5b65e1d310.png)
+
+**5.签署完之后将icla.pdf命令为 `姓名拼音-icla.pdf` 发送到导师提供的邮箱**
+
+**6.邮箱发送成功之后Apache  linkis 官方社区告知下**
+
+## 手动签名和PDF软件签名DEMO
+
+> PDF在线签名
+> - 下载PDF源文件
+> - 填写项目与个人信息
+> - 打开PDF在线签署网址
+> - 进入签名
+> - 保存下载已签名pdf
+> - 发送到指定邮箱
+> - 更新石墨[icla 签署状态文档](https://shimo.im/sheets/rPqtJcWPDPV9wWPd/MODOC/ 《icla签署状态表》,可复制链接后用石墨文档 App 或小程序打开)
+
+
+> 手写签名
+> - 下载PDF源文件
+> - 填写项目与个人信息n
+> - 打印文件
+> - 手写签名
+> - 拍照转成**单个pdf** 文件
+> - 发送到指定邮箱
+> - 更新石墨[icla 签署状态文档](https://shimo.im/sheets/rPqtJcWPDPV9wWPd/MODOC/ 《icla签署状态表》,可复制链接后用石墨文档 App 或小程序打开)
+
+![doc_example](https://user-images.githubusercontent.com/29391030/153530035-cf22ddd4-6327-4afd-92ae-d37a610ddbfc.png)
+
+![doc_content](https://user-images.githubusercontent.com/29391030/153530048-ab95f6be-4e05-4600-b656-74efa2fa332e.png)
diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md
index 5433ac0..48ad218 100644
--- a/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md
+++ b/i18n/zh-CN/docusaurus-plugin-content-docs-community/current/how-to-write-unit-test-code.md
@@ -95,32 +95,52 @@ public class $testClass {
 } 
 #end
 
-```    
+```   
+![test-0](https://user-images.githubusercontent.com/29391030/155080741-7e6b89db-0ee6-48e1-a858-4123d5bbf2f0.png) 
+
+1.配置配置测试类生成路径  
+原配置:${SOURCEPATH}/test/${PACKAGE}/${FILENAME}
+修改后配置:${SOURCEPATH}/../../test/java/${PACKAGE}/${FILENAME}
+如图:
+![test-1](https://user-images.githubusercontent.com/29391030/155080336-476feba6-2790-43b5-a572-ee0aa6a9586f.png)
+2.选择类——>右键——>Generate——>Junit Test,生成测试类  
+![test-2](https://user-images.githubusercontent.com/29391030/155080650-4fa68c66-5d7c-4e9f-ba63-0c7fc62d9df2.png)
+
 ## 1 单元测试准则
 ### 1.1 目录以及命名准则
 
 - 1.单元测试代码目录
-必须写在如下工程目录:src/test/java,不允许写在业务代码目录下。 说明:源码编译时会跳过此目录,而单元测试框架默认是扫描此目录,测试的配置文件必须放在:src/test/resources文件下
+    必须写在如下工程目录:src/test/java,不允许写在业务代码目录下。   
+    说明:源码编译时会跳过此目录,而单元测试框架默认是扫描此目录,测试的配置文件必须放在:src/test/resources文件下
 
-- 2.测试类所在的包名应该和被测试类所在的包名保持一致
-示例:
-业务类 src/main/java/org/apache/linkis/jobhistory/dao/JobDetailMapper.java
-对应的测试类 src/test/java/org/apache/linkis/jobhistory/dao/JobDetailMapperTest.java
+- 2.测试类所在的包名应该和被测试类所在的包名保持一致  
+    示例:  
+    业务类       src/main/java/org/apache/linkis/jobhistory/dao/JobDetailMapper.java  
+    对应的测试类 src/test/java/org/apache/linkis/jobhistory/dao/JobDetailMapperTest.java
 
-- 3.测试类的命名定义规范:使用Test作为类名的后缀
- 测试类的命名如下:被测试的业务+Test、被测试的接口+Test、被测试的类+Test
+- 3.测试类的命名定义规范:使用Test作为类名的后缀  
+    测试类的命名如下:  
+    被测试的业务+Test、被测试的接口+Test、被测试的类+Test
 
-- 4.测试用例的命名定义规范:使用test作为方法名的前缀
- 测试用例的命名规则是:test+方法名。避免使用test1、test2没有含义的名称,其次需要有必要的函数方法注释。
+- 4.测试用例的命名定义规范:使用test作为方法名的前缀    
+    测试用例的命名规则是:test+方法名。避免使用test1、test2没有含义的名称,其次需要有必要的函数方法注释。
 
 
 ### 1.2 编写准则
 - 1.单元测试中不准使用 System.out 来进行人肉验证,或则if判断来验证(可以使用log进行关键日志输出),必须使用断言 assert 来验证。
-- 2.保持单元测试的独立性。为了保证单元测试稳定可靠且便于维护,单元测试用例之间决不能互相调用,也不能依赖执行的先后次序。 反例:method2 需要依赖 method1 的执行,将执行结果作为 method2 的输入
+
+- 2.保持单元测试的独立性。为了保证单元测试稳定可靠且便于维护,单元测试用例之间决不能互相调用,也不能依赖执行的先后次序。   
+    反例:method2 需要依赖 method1 的执行,将执行结果作为 method2 的输入
+
 - 3.单元测试必须可以重复执行的,不能受到外界环境的影响。 
- 说明:单元测试通常会被放到持续集成中,每次有代码 check in 时单元测试都会被执行。如果单测对外部环境(网络、服务、中间件等)有依赖,容易导致持续集成机制的不可用。 正例:为了不受外界环境影响,要求设计代码时就把被测类的相关依赖改成注入,在测试时用 spring 这样的依赖注入框架注入一个本地(内存)实现或者 Mock 实现。
-- 4.增量代码确保单元测试通过。 说明:新增代码必须补充单元测试,如果新增代码影响了原有单元测试,请修正
-- 5.对于单元测试,要保证测试粒度足够小,有助于精确定位问题。单测粒度一般都是方法级别(工具类或则枚举类等极少场景可以是类级别)。 说明:只有测试粒度小才能在出错时尽快定位到出错位置。单测不负责检查跨类或者跨系统的交互逻辑,那是集成测试的领域。
+    说明:单元测试通常会被放到持续集成中,每次有代码 check in 时单元测试都会被执行。如果单测对外部环境(网络、服务、中间件等)有依赖,容易导致持续集成机制的不可用。   
+    正例:为了不受外界环境影响,要求设计代码时就把被测类的相关依赖改成注入,在测试时用 spring 这样的依赖注入框架注入一个本地(内存)实现或者 Mock 实现。
+ 
+- 4.增量代码确保单元测试通过。   
+    说明:新增代码必须补充单元测试,如果新增代码影响了原有单元测试,请修正
+
+- 5.对于单元测试,要保证测试粒度足够小,有助于精确定位问题。单测粒度一般都是方法级别(工具类或则枚举类等极少场景可以是类级别)。   
+    说明:只有测试粒度小才能在出错时尽快定位到出错位置。单测不负责检查跨类或者跨系统的交互逻辑,那是集成测试的领域。
  
 
  ## 2 断言的使用
@@ -167,36 +187,36 @@ Assertions.assertThrows方法,用来测试Executable实例执行execute方法
     }
 ```
 ### 2.3 断言使用准则
-**对象实例是否相等断言**
-是否是同一个对象实例
-```html
+**对象实例是否相等断言**  
+1.是否是同一个对象实例
+  ```html
     使用Junitd的Assertions.assertEquals
     Assertions.assertEquals(expectedJobDetail, actualJobDetail)
-```
+  ```
 
 
-不是同一个实例,但是比较实例的属性值是否完全相等
-AssertJ
-```html
+  不是同一个实例,但是比较实例的属性值是否完全相等
+  AssertJ
+  ```html
     常用场景 数据库更新操作前/后的对象比较
     使用AssertJ的assertThat断言usingRecursiveComparison模式
     Assertions.assertThat(actualObject).usingRecursiveComparison().isEqualTo(expectedObject);
-```
+  ```
 
 
-2 list等集合结果的断言 
-结果集集合的大小需要断言 
-范围或则具体大size 
+2.list等集合结果的断言 
+  结果集集合的大小需要断言 
+  范围或则具体大size 
 
-结果集集合中的每个对象需要断言,推荐结合stream模式的Predicate进行使用
-示例:
-```java
+  结果集集合中的每个对象需要断言,推荐结合stream模式的Predicate进行使用
+  示例:
+  ```java
     ArrayList<JobRespProtocol> jobRespProtocolArrayList=service.batchChange(jobDetailReqBatchUpdate);
     //list配和stream的predicate进行断言判断
     Predicate<JobRespProtocol> statusPrecate = e -> e.getStatus()==0;
     assertEquals(2, jobRespProtocolArrayList.size());
     assertTrue(jobRespProtocolArrayList.stream().anyMatch(statusPrecate));
-```
+  ```
 
 
 ## 3.单元测试的编写

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org