Improve test feedback by logging the availability checks for OpenSSL and Tomcat Native libraries when they're missing#970
Conversation
|
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. |
|
+1 on the class which loads the library at runtime. This way incompatible versions can also be checked rather than checking only .so files existence. |
f52e5ee to
b11e867
Compare
|
I added a small test to check that the library actually loads rather than using the TesterSSL test because it takes ages. This meant I included a dependency on the test-compile target to compile the test class. I could just add javac to avoid that if we think it's an issue. Also I couldn't figure out a way to avoid some of the platform specific location settings so open to ideas on that. |
b11e867 to
b3fe0f6
Compare
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.
b3fe0f6 to
a17b753
Compare
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.