Repository navigation
[improve][test] Remove conscrypt exception stacktrace in Apple silicon - #18359
Conversation
| conscryptClazz.getMethod("checkAvailability").invoke(null); | ||
| } catch (Throwable e) { | ||
| log.warn("Conscrypt isn't available. Using JDK default security provider.", e); | ||
| if (e.getCause() != null && e.getCause().getClass().getName().equals("java.lang.UnsatisfiedLinkError")) { |
There was a problem hiding this comment.
Could we use debug instead of warn?
There was a problem hiding this comment.
It's better to use level warn because it is a exception — not a If - else or something needs to record. This warn means conscrypt is not supported which needs to remind.
There was a problem hiding this comment.
If you want to avoid the too-long message, I suggest you just output the message and then add a debug log to print the stack trace.
…rityUtility.java Co-authored-by: Cong Zhao <[email protected]>
|
/pulsarbot run-failure-checks |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18359 +/- ##
============================================
+ Coverage 40.29% 47.21% +6.92%
- Complexity 8685 10403 +1718
============================================
Files 687 692 +5
Lines 67441 67764 +323
Branches 7225 7259 +34
============================================
+ Hits 27175 31995 +4820
+ Misses 37257 32183 -5074
- Partials 3009 3586 +577
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
tisonkun
left a comment
There was a problem hiding this comment.
LGTM. One code quality suggestion inline.
| conscryptClazz.getMethod("checkAvailability").invoke(null); | ||
| } catch (Throwable e) { | ||
| log.warn("Conscrypt isn't available. Using JDK default security provider.", e); | ||
| if (e.getCause() instanceof UnsatisfiedLinkError) { |
There was a problem hiding this comment.
@codelipenghui @nodece Do we have an exception util like Flink's findThrowable? I'm afraid that the error may be changed to differ wrap level.
|
/pulsarbot run-failure-checks |
Motivation
When running tests in Macos Apple silicon, there will be a long stacktrace like this
There's no osx aarch_64 conscrypt, so we can filter this stacktrace by catching
java.lang.UnsatisfiedLinkError.Verifying this change
Documentation
docdoc-requireddoc-not-neededdoc-completeMatching PR in forked repository
PR in forked repository: https://github.com/yaalsn/pulsar/pull/16