mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 02:14:54 +00:00
Build: Quiet naming convention logging (#37244)
This commit moves log statements related to classification of naming convention checks for tests to debug level. At info level they emit an enormous amount of output in CI, while these are not generally useful for debugging normal build failures.
This commit is contained in:
parent
95eef77ad4
commit
29c895b55c
@ -310,18 +310,18 @@ public class TestingConventionsTasks extends DefaultTask {
|
||||
|
||||
Class<?> junitTest = loadClassWithoutInitializing("org.junit.Assert", classLoader);
|
||||
if (junitTest.isAssignableFrom(clazz)) {
|
||||
getLogger().info("{} is a test because it extends {}", clazz.getName(), junitTest.getName());
|
||||
getLogger().debug("{} is a test because it extends {}", clazz.getName(), junitTest.getName());
|
||||
return true;
|
||||
}
|
||||
|
||||
Class<?> junitAnnotation = loadClassWithoutInitializing("org.junit.Test", classLoader);
|
||||
for (Method method : clazz.getMethods()) {
|
||||
if (matchesTestMethodNamingConvention(method)) {
|
||||
getLogger().info("{} is a test because it has method named '{}'", clazz.getName(), method.getName());
|
||||
getLogger().debug("{} is a test because it has method named '{}'", clazz.getName(), method.getName());
|
||||
return true;
|
||||
}
|
||||
if (isAnnotated(method, junitAnnotation)) {
|
||||
getLogger().info("{} is a test because it has method '{}' annotated with '{}'",
|
||||
getLogger().debug("{} is a test because it has method '{}' annotated with '{}'",
|
||||
clazz.getName(), method.getName(), junitAnnotation.getName());
|
||||
return true;
|
||||
}
|
||||
@ -340,7 +340,7 @@ public class TestingConventionsTasks extends DefaultTask {
|
||||
if (naming.stream()
|
||||
.map(TestingConventionRule::getSuffix)
|
||||
.anyMatch(suffix -> clazz.getName().endsWith(suffix))) {
|
||||
getLogger().info("{} is a test because it matches the naming convention", clazz.getName());
|
||||
getLogger().debug("{} is a test because it matches the naming convention", clazz.getName());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user