Message-ID: From: "vlsi (@vlsi)" To: "pgjdbc/pgjdbc" Date: Tue, 17 Mar 2026 09:53:45 +0000 Subject: [pgjdbc/pgjdbc] PR #3971: test: add @DisableLogger annotation to suppress expected log warnings in tests List-Id: X-GitHub-Author-Id: 213894 X-GitHub-Author-Login: vlsi X-GitHub-Issue: 3971 X-GitHub-Labels: chore X-GitHub-Repo: pgjdbc/pgjdbc X-GitHub-State: merged X-GitHub-Type: pull_request X-GitHub-Url: https://github.com/pgjdbc/pgjdbc/pull/3971 Content-Type: text/plain; charset=utf-8 Currently test output produces warnings caused by test code trying to test invalid parameters. The change silences those log messages so we do not confuse users and LLMs by "known to be false" warnings. --- Add a reusable `@DisableLogger` JUnit 5 annotation and `DisableLoggerExtension` that temporarily sets specified java.util.logging loggers to Level.OFF during test execution and restores them afterward. Apply it to tests that intentionally trigger log warnings (bad URLs, bad hostnames, cleanup exceptions). Also fix single-quote escaping in log messages (Can't -> Can''t) for `java.util.logging` `MessageFormat` compatibility, and split `rejectsBadUrls` into its own test method in `DriverTest`.