This is an automated email from the ASF dual-hosted git repository. clebertsuconic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 5e594cc18f9ebcf3b0dd85c70060a55d5ff9def3 Author: Clebert Suconic <[email protected]> AuthorDate: Wed Apr 22 18:29:53 2020 -0400 ARTEMIS-2732 Updating hacking guide --- docs/hacking-guide/en/tests.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/hacking-guide/en/tests.md b/docs/hacking-guide/en/tests.md index a82ad51..07fe73a 100644 --- a/docs/hacking-guide/en/tests.md +++ b/docs/hacking-guide/en/tests.md @@ -41,6 +41,27 @@ which eliminates all the setup and class variables which are provided by `Single ## Keys for writing good tests +### Use log.debug + +- Please use log.debug instead of log.info. + +On your classes, import the following: + +```java +public class MyTest { + private static final org.jboss.logging.Logger log = org.jboss.logging.Logger.getLogger($CLASS_NAME$.class); + + @Test + public void test() { + log.debug("Log only what you need please!"); + } +} +``` + +- Please do not use System.out.println() + +As a general rule, only use System.out if you really intend an error to be on the reporting. Debug information should be called through log.debug. + ### Avoid leaks An important task for any test-case is to clean up all the resources it creates when it runs. This includes the server
