This is an automated email from the ASF dual-hosted git repository.
olamy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git
The following commit(s) were added to refs/heads/master by this push:
new d29e30632 Reduce log level for skipped tests result to info (#3232)
d29e30632 is described below
commit d29e30632f82b3d61eba3c04d177c0d9c0cdef5f
Author: strangelookingnerd
<[email protected]>
AuthorDate: Mon Dec 22 01:55:56 2025 +0100
Reduce log level for skipped tests result to info (#3232)
---
.../org/apache/maven/plugin/surefire/log/api/Level.java | 14 +++++++++-----
.../apache/maven/plugin/surefire/log/api/LevelTest.java | 2 +-
2 files changed, 10 insertions(+), 6 deletions(-)
diff --git
a/surefire-logger-api/src/main/java/org/apache/maven/plugin/surefire/log/api/Level.java
b/surefire-logger-api/src/main/java/org/apache/maven/plugin/surefire/log/api/Level.java
index a99c04e19..849283719 100644
---
a/surefire-logger-api/src/main/java/org/apache/maven/plugin/surefire/log/api/Level.java
+++
b/surefire-logger-api/src/main/java/org/apache/maven/plugin/surefire/log/api/Level.java
@@ -48,14 +48,18 @@ public enum Level {
public static Level resolveLevel(
boolean hasSuccessful, boolean hasFailure, boolean hasError,
boolean hasSkipped, boolean hasFlake) {
- boolean isRed = hasFailure | hasError;
- if (isRed) {
+ if (hasFailure || hasError) {
return FAILURE;
}
- boolean isYellow = hasSkipped | hasFlake;
- if (isYellow) {
+ if (hasFlake) {
return UNSTABLE;
}
- return hasSuccessful ? SUCCESS : NO_COLOR;
+ if (hasSkipped) {
+ return NO_COLOR;
+ }
+ if (hasSuccessful) {
+ return SUCCESS;
+ }
+ return NO_COLOR;
}
}
diff --git
a/surefire-logger-api/src/test/java/org/apache/maven/plugin/surefire/log/api/LevelTest.java
b/surefire-logger-api/src/test/java/org/apache/maven/plugin/surefire/log/api/LevelTest.java
index 0477ce9e0..0cedf5fd2 100644
---
a/surefire-logger-api/src/test/java/org/apache/maven/plugin/surefire/log/api/LevelTest.java
+++
b/surefire-logger-api/src/test/java/org/apache/maven/plugin/surefire/log/api/LevelTest.java
@@ -54,7 +54,7 @@ public void shouldBeError() {
@Test
public void shouldBeSkipped() {
Level level = resolveLevel(false, false, false, true, false);
- assertThat(level).isEqualTo(Level.UNSTABLE);
+ assertThat(level).isEqualTo(Level.NO_COLOR);
}
@Test