Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
eb0bab2
chore: suppress expected test errors from CI console output
jason-p-pickering Feb 3, 2026
2bfa91b
chore: also suppress webapi.controller errors in test logs
jason-p-pickering Feb 3, 2026
1656ec5
test: add temporary FATAL log to verify suppression config (remove me)
jason-p-pickering Feb 3, 2026
0ffdfae
chore: make test log suppression toggleable via ci-verbose label
jason-p-pickering Feb 3, 2026
027d061
chore: use log4j2 OFF level instead of FATAL for test log suppression
jason-p-pickering Feb 4, 2026
9d6fb9e
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Feb 5, 2026
22dee6d
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Feb 5, 2026
2450b88
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Feb 9, 2026
cbca0e8
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Feb 10, 2026
08a74ce
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Feb 17, 2026
79b0550
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Feb 24, 2026
cb0d6ec
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Mar 4, 2026
59ead75
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Mar 6, 2026
4d03410
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Mar 8, 2026
6193053
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Mar 18, 2026
c706337
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering Apr 14, 2026
3d1e32c
Merge branch 'master' into quiet-ci-test-logs
jason-p-pickering May 11, 2026
660b4f2
More noise suppression
jason-p-pickering May 11, 2026
7be94b7
Narrow scope
jason-p-pickering May 11, 2026
8c36637
Merge branch 'master' of github.com:dhis2/dhis2-core into quiet-ci-te…
jason-p-pickering May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/analyse-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=125
# PR → quiet (unless ci-verbose label), push/schedule → info, workflow_dispatch → user choice
MAVEN_ARGS: ${{ (inputs.maven_log == 'debug' && '-X') || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci-verbose') && '-q') || (inputs.maven_log == 'quiet' && '-q') || '' }}
# Controls log4j2 suppression of expected test errors. ci-verbose label sets to error to show them.
TEST_LOG_SUPPRESSED_LEVEL: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-verbose') && 'error') || (inputs.maven_log == 'debug' && 'error') || 'off' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.DHIS2_BOT_SONARCLOUD_TOKEN }}
on:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run-api-analytics-tests-doris.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=125
# PR → quiet (unless ci-verbose label), push/schedule → info, workflow_dispatch → user choice
MAVEN_ARGS: ${{ (inputs.maven_log == 'debug' && '-X') || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci-verbose') && '-q') || (inputs.maven_log == 'quiet' && '-q') || '' }}
# Controls log4j2 suppression of expected test errors. ci-verbose label sets to error to show them.
TEST_LOG_SUPPRESSED_LEVEL: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-verbose') && 'error') || (inputs.maven_log == 'debug' && 'error') || 'off' }}

on:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run-api-analytics-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=125
# PR → quiet (unless ci-verbose label), push/schedule → info, workflow_dispatch → user choice
MAVEN_ARGS: ${{ (inputs.maven_log == 'debug' && '-X') || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci-verbose') && '-q') || (inputs.maven_log == 'quiet' && '-q') || '' }}
# Controls log4j2 suppression of expected test errors. ci-verbose label sets to error to show them.
TEST_LOG_SUPPRESSED_LEVEL: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-verbose') && 'error') || (inputs.maven_log == 'debug' && 'error') || 'off' }}

on:
pull_request:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run-api-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
MAVEN_OPTS: -Xmx1024m -Xms1024m -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=125
# PR → quiet (unless ci-verbose label), push/schedule → info, workflow_dispatch → user choice
MAVEN_ARGS: ${{ (inputs.maven_log == 'debug' && '-X') || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci-verbose') && '-q') || (inputs.maven_log == 'quiet' && '-q') || '' }}
# Controls log4j2 suppression of expected test errors. ci-verbose label sets to error to show them.
TEST_LOG_SUPPRESSED_LEVEL: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-verbose') && 'error') || (inputs.maven_log == 'debug' && 'error') || 'off' }}

on:
push:
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false -Dmaven.wagon.http.retryHandler.class=standard -Dmaven.wagon.http.retryHandler.count=3 -Dmaven.wagon.httpconnectionManager.ttlSeconds=125
# PR → quiet (unless ci-verbose label), push/schedule → info, workflow_dispatch → user choice
MAVEN_ARGS: ${{ (inputs.maven_log == 'debug' && '-X') || (github.event_name == 'pull_request' && !contains(github.event.pull_request.labels.*.name, 'ci-verbose') && '-q') || (inputs.maven_log == 'quiet' && '-q') || '' }}
# Controls log4j2 suppression of expected test errors. ci-verbose label sets to error to show them.
TEST_LOG_SUPPRESSED_LEVEL: ${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci-verbose') && 'error') || (inputs.maven_log == 'debug' && 'error') || 'off' }}
on:
push:
branches:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
<Configuration status="warn">
<Properties>
<Property name="layout">%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n</Property>
<!-- CI sets TEST_LOG_SUPPRESSED_LEVEL=error when ci-verbose label is present to show all errors.
Defaults to off which disables these loggers entirely. -->
<Property name="suppressed.level">${env:TEST_LOG_SUPPRESSED_LEVEL:-off}</Property>
</Properties>

<Appenders>
Expand All @@ -17,6 +20,23 @@
</Appenders>

<Loggers>
<!-- Suppress expected errors from tests exercising error paths and from resources
not available in test classpaths (e.g. build.properties, apps-bundle.json).
These are not real failures - the tests pass, but the application logs at ERROR. -->
<Logger name="org.hisp.dhis.scheduling" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.system" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.appmanager" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.fileresource" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.sms" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.route" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.dxf2.gml" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.rules.engine" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.tracker.imports.sms" level="${suppressed.level}"/>
<!-- CrudControllerAdvice is the global @ControllerAdvice that catches exceptions from tests
deliberately exercising error paths (e.g. SQL injection tests). The broad package suppression
was replaced with this targeted class to keep other controller errors visible. -->
<Logger name="org.hisp.dhis.webapi.controller.CrudControllerAdvice" level="${suppressed.level}"/>

<Root level="warn">
<!-- Set to error so CI test runs are quiet, we see failed tests easily but still see errors from libraries
we use due to for example misconfigurations or so. If you want to increase the verbosity of specific
Expand All @@ -27,6 +47,10 @@
<AppenderRef ref="file" level="warn"/>
</Root>

<!-- Tests that verify uniqueness constraints intentionally trigger duplicate-key
violations; Hibernate logs every such exception at ERROR via SqlExceptionHelper. -->
<Logger name="org.hibernate.engine.jdbc.spi.SqlExceptionHelper" level="fatal" additivity="false"/>

<!-- A few examples of loggers that might be useful to debug integration test issues.
Adding an AppenderRef is necessary to overrule the log level we have set on the Root AppenderRefs.
Once you add an AppenderRef to a Logger you need to set additivity to false otherwise logs might appear twice
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import static org.junit.jupiter.api.Assertions.assertNull;

import java.time.Instant;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
Expand Down Expand Up @@ -172,11 +171,6 @@ void testFindByAuthorizationCode() {
// When
authorizationService.save(authorization);

List<Dhis2OAuth2Authorization> all = authorizationService.getAll();
for (Dhis2OAuth2Authorization oAuth2Authorization : all) {
System.out.println(oAuth2Authorization);
}

OAuth2Authorization foundAuthorization =
authorizationService.findByToken(
"code-value", new OAuth2TokenType(OAuth2ParameterNames.CODE));
Expand Down
24 changes: 24 additions & 0 deletions dhis-2/dhis-test-integration/src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<Configuration status="warn">
<Properties>
<Property name="layout">%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n</Property>
<!-- CI sets TEST_LOG_SUPPRESSED_LEVEL=error when ci-verbose label is present to show all errors.
Defaults to off which disables these loggers entirely. -->
<Property name="suppressed.level">${env:TEST_LOG_SUPPRESSED_LEVEL:-off}</Property>
</Properties>

<Appenders>
Expand All @@ -14,6 +17,23 @@
</Appenders>

<Loggers>
<!-- Suppress expected errors from tests exercising error paths and from resources
not available in test classpaths (e.g. build.properties, apps-bundle.json).
These are not real failures - the tests pass, but the application logs at ERROR. -->
<Logger name="org.hisp.dhis.scheduling" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.system" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.appmanager" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.fileresource" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.sms" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.route" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.dxf2.gml" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.rules.engine" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.tracker.imports.sms" level="${suppressed.level}"/>
<!-- CrudControllerAdvice is the global @ControllerAdvice that catches exceptions from tests
deliberately exercising error paths (e.g. SQL injection tests). The broad package suppression
was replaced with this targeted class to keep other controller errors visible. -->
<Logger name="org.hisp.dhis.webapi.controller.CrudControllerAdvice" level="${suppressed.level}"/>

<Root level="warn">
<!-- Set to error so CI test runs are quiet, we see failed tests easily but still see errors from libraries
we use due to for example misconfigurations or so. If you want to increase the verbosity of specific
Expand All @@ -30,6 +50,10 @@
as they propagate up from the Logger to its parent which is the Root.
Check the log4j2 config documentation for more details. Uncomment the various loggers to debug the tests. -->

<!-- Tests that verify uniqueness constraints intentionally trigger duplicate-key
violations; Hibernate logs every such exception at ERROR via SqlExceptionHelper. -->
<Logger name="org.hibernate.engine.jdbc.spi.SqlExceptionHelper" level="fatal" additivity="false"/>

<!-- DHIS2 -->
<!--
<Logger name="org.hisp.dhis.migration" level="info" additivity="false">
Expand Down
31 changes: 31 additions & 0 deletions dhis-2/dhis-test-web-api/src/test/resources/log4j2-test.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
<Configuration status="warn">
<Properties>
<Property name="layout">%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n</Property>
<!-- CI sets TEST_LOG_SUPPRESSED_LEVEL=error when ci-verbose label is present to show all errors.
Defaults to off which disables these loggers entirely. -->
<Property name="suppressed.level">${env:TEST_LOG_SUPPRESSED_LEVEL:-off}</Property>
</Properties>

<Appenders>
Expand All @@ -18,6 +21,23 @@
</Appenders>

<Loggers>
<!-- Suppress expected errors from tests exercising error paths and from resources
not available in test classpaths (e.g. build.properties, apps-bundle.json).
These are not real failures - the tests pass, but the application logs at ERROR. -->
<Logger name="org.hisp.dhis.scheduling" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.system" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.appmanager" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.fileresource" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.sms" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.route" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.dxf2.gml" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.rules.engine" level="${suppressed.level}"/>
<Logger name="org.hisp.dhis.tracker.imports.sms" level="${suppressed.level}"/>
<!-- CrudControllerAdvice is the global @ControllerAdvice that catches exceptions from tests
deliberately exercising error paths (e.g. SQL injection tests). The broad package suppression
was replaced with this targeted class to keep other controller errors visible. -->
<Logger name="org.hisp.dhis.webapi.controller.CrudControllerAdvice" level="${suppressed.level}"/>

<Root level="warn">
<!-- Set to error so CI test runs are quiet, we see failed tests easily but still see errors from libraries
we use due to for example misconfigurations or so. If you want to increase the verbosity of specific
Expand All @@ -30,6 +50,17 @@

<Logger name="org.openapitools.codegen" level="off"/>

<!-- Analytics tables do not exist in the test database, so any test that drives
the analytics engine (e.g. ADEX) produces expected "relation does not exist"
SQL errors. The tests still pass; suppress the noise. -->
<Logger name="org.hisp.dhis.analytics.data.JdbcAnalyticsManager" level="fatal" additivity="false"/>
<Logger name="org.hisp.dhis.analytics.data.handler.DataHandler" level="fatal" additivity="false"/>
<Logger name="org.hisp.dhis.analytics.util.AnalyticsUtils" level="fatal" additivity="false"/>

<!-- Tests that verify uniqueness constraints intentionally trigger duplicate-key
violations; Hibernate logs every such exception at ERROR via SqlExceptionHelper. -->
<Logger name="org.hibernate.engine.jdbc.spi.SqlExceptionHelper" level="fatal" additivity="false"/>

<!-- A few examples of loggers that might be useful to debug integration test issues.
Adding an AppenderRef is necessary to overrule the log level we have set on the Root AppenderRefs.
Once you add an AppenderRef to a Logger you need to set additivity to false otherwise logs might appear twice
Expand Down
Loading