-
Notifications
You must be signed in to change notification settings - Fork 28
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
LPD-47903 NPE in HttpInvoker due to httpURLConnection.getErrorStream returning null #158601
Conversation
✔️ ci:test:sf - 1 out of 1 jobs passed in 4 minutesClick here for more details.Base Branch:Branch Name: master Sender Branch:Branch Name: LPD-47903 1 Successful Jobs:For more details click here. |
To conserve resources, the PR Tester does not automatically run for forwarded pull requests. |
✔️ ci:test:stable - 25 out of 25 jobs passed❌ ci:test:relevant - 103 out of 143 jobs passed in 3 hours 46 minutesClick here for more details.Base Branch:Branch Name: master Upstream Comparison:Branch GIT ID: 93ef501e569609909bd960ab12a448298d442074 ci:test:stable - 25 out of 25 jobs PASSED25 Successful Jobs:ci:test:relevant - 103 out of 143 jobs PASSED40 Failed Jobs:
103 Successful Jobs:For more details click here.Failures unique to this pull:
Test bundle downloads: |
Merged. Thank you. |
Forwarded from: liferay-headless#2524 (Took 2
ci:forward
attempts in 5 hours 42 minutes)Console
@jonathanmccann
@liferay-headless
Original pull request comment:
What is this trying to solve?
https://liferay.atlassian.net/browse/LPD-47903
How am I fixing it?
Previously reviewed liferay-headless#2502
Resending with requested changes from #158550 (comment)
In certain cases
httpURLConnection.getErrorStream()
can returnnull
as defined in the spec - https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/net/HttpURLConnection.html#getErrorStream()This was caught in one of Site Management's tests where we expect the action to fail and confirm it fails with the correct status code.
I updated the template to only process the
inputStream
if it exists. Please let me know your thoughts on the change and if you see an alternative approach that you would prefer instead. Thank you.How can you verify that it works?
In
headless-site-test
rungw testIntegration --tests *.SiteResourceTest
In
petra-http-invoker
rungw test --tests "HttpInvokerTest"