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

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


The following commit(s) were added to refs/heads/master by this push:
     new 359dbb27c DELTASPIKE-1482 don't manually set log level.
359dbb27c is described below

commit 359dbb27c72dbb9d0a92165a68154ff6e254068f
Author: Mark Struberg <[email protected]>
AuthorDate: Wed Jul 30 08:45:42 2025 +0200

    DELTASPIKE-1482 don't manually set log level.
    
    I've removed the setLevel calls from finished and failure.
    The message in testFailure will now logged at Level.SEVERE though.
---
 .../testcontrol/api/junit/CdiTestSuiteRunner.java  | 28 +++-------------------
 1 file changed, 3 insertions(+), 25 deletions(-)

diff --git 
a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
 
b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
index 428656b74..b49f34584 100644
--- 
a/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
+++ 
b/deltaspike/modules/test-control/api/src/main/java/org/apache/deltaspike/testcontrol/api/junit/CdiTestSuiteRunner.java
@@ -181,47 +181,25 @@ public class CdiTestSuiteRunner extends Suite
         @Override
         public void testFinished(Description description) throws Exception
         {
-            Level level = this.logger.getLevel();
-
-            this.logger.setLevel(Level.INFO);
-
             if (TRUE.equals(IS_CDI_TEST_RUNNER_EXECUTION.get()))
             {
                 this.logger.info("[finished] " + description.getClassName() + 
"#" + description.getMethodName());
             }
 
-            try
-            {
-                super.testFinished(description);
-            }
-            finally
-            {
-                this.logger.setLevel(level);
-            }
+            super.testFinished(description);
         }
 
         @Override
         public void testFailure(Failure failure) throws Exception
         {
-            Level level = this.logger.getLevel();
-
-            this.logger.setLevel(Level.INFO);
-
             if (TRUE.equals(IS_CDI_TEST_RUNNER_EXECUTION.get()))
             {
                 Description description = failure.getDescription();
-                this.logger.info("[failed] " + description.getClassName() + 
"#" + description.getMethodName() +
+                this.logger.log(Level.SEVERE, "[failed] " + 
description.getClassName() + "#" + description.getMethodName() +
                     " message: " + failure.getMessage());
             }
 
-            try
-            {
-                super.testFailure(failure);
-            }
-            finally
-            {
-                this.logger.setLevel(level);
-            }
+            super.testFailure(failure);
         }
     }
 

Reply via email to