New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #668 External DTD failure for uber-jar #669
Conversation
extensions/core/deployment/src/main/java/io/quarkiverse/cxf/deployment/QuarkusCxfProcessor.java
Outdated
Show resolved
Hide resolved
@shumonsharif would you mind adding a test that fails before this change and succeeds after it? Otherwise it is hard to make sure that we won't break it in the future. |
extensions/core/deployment/src/main/java/io/quarkiverse/cxf/deployment/QuarkusCxfProcessor.java
Outdated
Show resolved
Hide resolved
@ppalaga The only way I can think of to test the |
@ppalaga Added a unit test, and addressed the code review comments, but the build appears to be failing in a seemingly unrelated unit test: https://github.com/quarkiverse/quarkus-cxf/actions/runs/3838074101/jobs/6534191935#step:5:622 Any ideas on what's causing this? |
I could not reproduce it locally, so I just rerun the failing tests. |
.setApplicationVersion("0.1-SNAPSHOT") | ||
.setRun(true) | ||
.setExpectExit(true) | ||
.overrideConfigKey("quarkus.package.type", "uber-jar") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect this is not doing what we'd hope for. These @RegisterExtension
tests IIRC always work with an in-memory class-loader and I think .overrideConfigKey("quarkus.package.type", "uber-jar")
has no effect. This can be proven by a simple experiment: when all changes in this PR except the test are reverted, the test should fail, but in reality it does not (I checked). I think we need a proper integration test.
For reading the log from an integration test, you need two things:
quarkus.log.file.enable = true
in application properties- A piece of Awaitility code repeatedly reading the whole log file: https://github.com/apache/camel-quarkus/blob/main/integration-test-groups/foundation/direct/src/test/java/org/apache/camel/quarkus/component/direct/it/DirectTest.java#L63-L66
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ppalaga Reverting the PR (except for the unit test) failed the test for me when I had tried it locally? Not sure why you're seeing something different - but I'll look into it later this week and keep you posted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aaah, I think I found the culprit just by looking at the code. I had fixed some typos in the code, so please include the changes below and the test should fail fine with everything else reverted. I think the test is fine and working as it should be. @ppalaga please keep me posted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, thanks for explaining, indeed it is failing as expected with those log messages modified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please squash your commits and rebase on top of the current main?
9b09672
to
e6fedcf
Compare
@ppalaga cc: @famod I just squashed my commits and rebased on top of current main. However, the build is still oddly failing in that same |
Without touching anything, it doesn't fail on my box either (WSL2 Ubuntu 22.04). But I can make it fail via |
Passes:
Fails:
|
|
I think this is a bug in Quarkus: It seems that the I'll try to work around that and will at least report it upstream (or maybe even send a PR). Edit: It's more complicated as |
… is fixed upstream
Green! 🎉 @shumonsharif @ppalaga I'll go ahead and merge this. Please do raise concerns via separate issues or comments in case you disagree with my workaround. |
Nice work Falko, and thank you for helping out with this. The updates look good to me! |
Great troubleshooting, thanks a lot @famod ! |
Thanks guys! We should be able to get rid of that workaround once we have updated to 2.16.0.Final (see linked PR). |
No description provided.