Improve test feedback by logging the availability checks for OpenSSL and Tomcat Native libraries when they're missing#970
Conversation
When either are unavailable, the tests are silently skipped or excluded without a clear explanation to the user. The new warning makes it obvious that the OpenSSL or Tomcat Native tests will be skipped without having the look for which tests were skipped.
|
If tomcat-native is installed system-wide for example /usr/lib as is currently in Fedora, JVM will load it but the test.apr.loc check will fail. |
|
You're right. We could document setting test.apr.loc to the local binaries as a requirement to get the benefit of the check, but given that it doesn't actually do anything if it fails to find it and the library will still load at runtime, the message being inaccurate is the only issue, right? |
|
On second thought, the best option is to create a small class to load it at runtime to confirm it actually loads rather than string matching env vars...otherwise there's always the potential for runtime issues that you can't check for. I can add a java library path check, but it's still not completely accurate if there's any runtime errors. |
When running the tests without OpenSSL or Tomcat Native installed, there are several things happening without a clear explanation (without having to dig into individual test outputs):
Assume.assumeTrue()checksAdding a warning when the libraries are missing allows you to check the target output to confirm that natives are being included in the tests without prior knowledge of which tests would be skipped when they're missing.