You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2022/07/13 02:46:57 UTC

[shardingsphere] branch master updated: Update Code of Conduct about Mockito (#19083)

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

panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 791878cc71f Update Code of Conduct about Mockito (#19083)
791878cc71f is described below

commit 791878cc71ff2f9997a085cb511370d9ca8ab522
Author: 吴伟杰 <wu...@apache.org>
AuthorDate: Wed Jul 13 10:46:51 2022 +0800

    Update Code of Conduct about Mockito (#19083)
---
 docs/community/content/contribute/code-conduct.cn.md | 1 +
 docs/community/content/contribute/code-conduct.en.md | 1 +
 2 files changed, 2 insertions(+)

diff --git a/docs/community/content/contribute/code-conduct.cn.md b/docs/community/content/contribute/code-conduct.cn.md
index e989b63de94..060bef79972 100644
--- a/docs/community/content/contribute/code-conduct.cn.md
+++ b/docs/community/content/contribute/code-conduct.cn.md
@@ -73,6 +73,7 @@ chapter = true
  - 精确断言,尽量不使用 `not`,`containsString` 断言。
  - 测试用例的真实值应名为为 actual XXX,期望值应命名为 expected XXX。
  - 测试类和 `@Test` 标注的方法无需 javadoc。
+ - 使用 Mockito mockStatic 和 mockConstruction 方法必须搭配 try-with-resource 或在清理方法中关闭,避免泄漏。
 
 ## G4 编码规范
  - 公共规范
diff --git a/docs/community/content/contribute/code-conduct.en.md b/docs/community/content/contribute/code-conduct.en.md
index cef80190d88..4f2d450c5ee 100644
--- a/docs/community/content/contribute/code-conduct.en.md
+++ b/docs/community/content/contribute/code-conduct.en.md
@@ -71,6 +71,7 @@ The following code of conduct is based on full compliance with [ASF CODE OF COND
  - For accurate asserts, try not to use `not`, `containsString` to make assertions.
  - Actual values of test cases should be named `actualXXX`, expected values `expectedXXX`.
  - Class for test case and `@Test` annotation do not need javadoc.
+ - Mockito mockStatic and mockConstruction methods must be used with try-with-resource or closed in the teardown method to avoid leaks.
 
 ## Contributor Covenant G4 Code of Conduct
  - Common Conduct