adityamparikh opened a new pull request, #61:
URL: https://github.com/apache/solr-mcp/pull/61
## Summary
- Replace deprecated `/admin/mbeans` endpoint with `/admin/metrics` API
(available since Solr 7.1+) for cache and handler metrics collection
- Ensures compatibility with both Solr 9 and Solr 10, where `/admin/mbeans`
was removed
- Handle both `NamedList` and `Map` (LinkedHashMap) response types from
Metrics API
- Strengthen integration test assertions to require non-null cache and
handler stats
## Changes
- **CollectionService**: Migrate `getCacheMetrics()` and
`getHandlerMetrics()` from `/admin/mbeans` to `/admin/metrics` with
`group=core` prefix filtering
- **CollectionServiceTest**: Rewrite mock data helpers to match Metrics API
response format (`{metrics: {solr.core.<collection>: {...}}}`)
- **CollectionServiceIntegrationTest**: Replace conditional cache/handler
assertions with strong `assertNotNull` checks
- **CLAUDE.md**: Update Solr 10 compatibility section to reflect completed
migration
- Add SLF4J logging to `CollectionService`
## Test plan
- [x] All unit tests pass with Metrics API mock data format
- [x] Integration tests pass against real Solr via Testcontainers with
strong assertions for cache and handler stats
- [x] `./gradlew clean build` passes with no regressions
- [ ] Verify against Solr 9.x and 10.x Docker images
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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]