RFR: 8365983: Tests should throw SkippedException when SCTP not supported
Francesco Andreuzzi
duke at openjdk.org
Fri Aug 22 13:36:38 UTC 2025
On Fri, 22 Aug 2025 13:30:19 GMT, SendaoYan <syan at openjdk.org> wrote:
> Currently, take test/jdk/com/sun/nio/sctp/SctpMultiChannel/Branch.java as example. When Util.isSCTPSupported() return false, then test print a warning and the exit.
>
> I think it's better to throw jtreg.SkippedException rather than only print a warning and then report test passed.
>
> Change has been verified locally, test-fix only, almost no risk.
test/jdk/com/sun/nio/sctp/SctpChannel/Bind.java line 342:
> 340: public static void main(String[] args) throws Throwable {
> 341: if (!Util.isSCTPSupported()) {
> 342: throw new jtreg.SkippedException("SCTP protocol is not supported");
Why do you need to qualify the name with `jtreg.`?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26903#discussion_r2293755627
More information about the nio-dev
mailing list