pgjdbc/pgjdbc GitHub issues and pull requests (mirror)
help / color / mirror / Atom feedFrom: vlsi (@vlsi) <[email protected]>
To: pgjdbc/pgjdbc <[email protected]>
Subject: [pgjdbc/pgjdbc] PR #3654: chore: make the build fail in case the tests are not declared properly
Date: Wed, 04 Jun 2025 12:57:49 +0000
Message-ID: <[email protected]> (raw)
JUnit 5.13 can detect misplaced @Test annotations which were previously ignored. For instance, if the method returns Object rather than void, JUnit ignores the test.
After the change, such issues should result in a build failure.
The new property requires JUnit 5.13, so I'll move the change to https://github.com/pgjdbc/pgjdbc/pull/3652
Here's a sample failure:
```
> Task :postgresql:test FAILED
FAILURE 0,0sec, UnknownClass > initializationError
org.junit.platform.launcher.core.DiscoveryIssueException: TestEngine with ID 'junit-jupiter' encountered 2 critical issues during test discovery:
(1) [WARNING] @Test method 'private int org.postgresql.test.jdbc42.SetObject310InfinityTest.abc()' must not be private. It will not be executed.
Source: MethodSource [className = 'org.postgresql.test.jdbc42.SetObject310InfinityTest', methodName = 'abc', methodParameterTypes = '']
at org.postgresql.test.jdbc42.SetObject310InfinityTest.abc(SourceFile:0)
(2) [WARNING] @Test method 'private int org.postgresql.test.jdbc42.SetObject310InfinityTest.abc()' must not return a value. It will not be executed.
Source: MethodSource [className = 'org.postgresql.test.jdbc42.SetObject310InfinityTest', methodName = 'abc', methodParameterTypes = '']
at org.postgresql.test.jdbc42.SetObject310InfinityTest.abc(SourceFile:0)
```
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: github://pgjdbc/pgjdbc
Cc: [email protected], [email protected]
Subject: Re: [pgjdbc/pgjdbc] PR #3654: chore: make the build fail in case the tests are not declared properly
In-Reply-To: <<[email protected]>>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox