serhiy-bzhezytskyy opened a new pull request, #4787: URL: https://github.com/apache/solr/pull/4787
https://issues.apache.org/jira/browse/SOLR-18354 Removed the deprecated `SolrTestCaseJ4.ignoreException(String)`, `unIgnoreException(String)`, and `resetExceptionIgnores()`, replacing every caller with `ErrorLogMuter` (`try (ErrorLogMuter muter = ErrorLogMuter.regex("pattern")) { ... }`). This ended up touching ~70 files, not just `SolrTestCaseJ4` itself -- the deprecated methods were baked into the base class's own `@BeforeClass`/`@AfterClass`/`initCore()` lifecycle, and `ErrorLogMuter` (scoped, `AutoCloseable`) has no equivalent for the old API's shared-map "reset everything" convenience, so each call site needed reading rather than a mechanical rename. A few things worth calling out: - `SolrTestCaseJ4` now holds a single `ignoreExceptionMuter` field (created in `setupTestCases()`/`initCore()`, closed in `teardownTestCases()`) instead of the shared `errorMuters` map, with a defensive close-if-leaked check at the start of `setupTestCases()` to preserve the one bit of robustness the old blanket reset gave for free (cleanup if a previous test class failed to tear down cleanly). - Found and fixed a stray-character typo along the way: `TestConfigSetsAPI` had `unIgnoreException("already exists\`")` (extra backtick) which meant that particular un-ignore never actually matched its `ignoreException("already exists")` -- a silent no-op in the deprecated API that's structurally impossible once both ends reference the same `ErrorLogMuter` instance. - Added a changelog entry: `solr-test-framework` is a published Maven artifact and these were `public static` methods, so this is a real API break for downstream test code, not purely internal. Verified with a full-repo `./gradlew compileTestJava` (confirms no caller was missed anywhere in the tree) plus targeted test runs across every lifecycle path touched (single-node, cursor, distributed/cloud, lock-on-startup, etc.). cc @dsmiley @epugh @janhoy AI-assisted (Claude Sonnet 5) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
