[PR] Add tests to verify tomcat functions properly when cluste ring JARs are not present at runtime [tomcat]

csutherl (via GitHub) <[email protected]>
Newsgroups gmane.comp.jakarta.tomcat.devel
Message-ID <[email protected]>
csutherl opened a new pull request, #1038:
URL: https://github.com/apache/tomcat/pull/1038

   This change follows up on 91ac7518 and a few other recent commits which make cluster classloading fully dynamic by using reflection to handle clustering classes that are missing at runtime. These tests verify that tomcat work correctly when `catalina-ha.jar` and `catalina-tribes.jar` are not present using filtering classloaders to simulate  that environment.
   
   The tests cover:
   
   - Catalina startup: Tomcat starts and serves requests when clustering classes are unavailable (`addClusterRuleSet()` logs instead of failing)
   - `sessionsList.jsp`: The Manager app sessions page compiles and renders without clustering, exercising the reflection-based fallback from 91ac7518
   - StandardEngineSF/StandardHostSF:  `StoreConfig` classes load without error; `clusterValveClass` fields are null when clustering is absent
   - `StoreRegistry.getInterfaces()`: Returns only the 10 core interfaces (no clustering interfaces) when clustering classes are not on the classpath
   
   Each test uses a custom classloader (`NoClusterClassLoader` or `StoreConfigIsolatingClassLoader`) that throws a `ClassNotFoundException` for `org.apache.catalina.ha.*` and `org.apache.catalina.tribes.*` packages.
   
   They're just a tests but I'm submitting this PR for some feedback since it's a bit of a hacky solution before committing.
   


-- 
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]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.