You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "georgew5656 (via GitHub)" <gi...@apache.org> on 2023/05/04 18:16:19 UTC
[GitHub] [druid] georgew5656 opened a new pull request, #14207: Fix unit tests for java 17
georgew5656 opened a new pull request, #14207:
URL: https://github.com/apache/druid/pull/14207
Some of the PodTemplateTaskAdapter unit tests fail in Java 17 due to differences in the underlying gzip compression implementation.
In our case, it produces a -1 instead of a 0 in the output stream which is translated into a difference in the task annotation.
I took a look at the underlying Deflater configuration between Java 11 and Java 17 thinking that might be the difference between the outputs but the configurations looked the same to me.
After looking at this for a while I couldn't find any reason for the difference in gzip'd values other than different lower level implementations in java 11 and 17 so I decided to just update the unit test to make sure that the decompressed task annotation matches what we expect.
### Description
Fix a unit test that fails in java 17
I looked into alternate solutions like setting the config for the deflater in the gzip stream class but none of that seemed to work.
#### Release note
Fix Unit tests
##### Key changed/added classes in this PR
PodTemplateTaskAdapterTest
This PR has:
- [ X] been self-reviewed.
- [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] added documentation for new or modified features or behaviors.
- [ ] a release note entry in the PR description.
- [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
- [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
- [ X] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] georgew5656 commented on pull request #14207: Fix unit tests for java 17
Posted by "georgew5656 (via GitHub)" <gi...@apache.org>.
georgew5656 commented on PR #14207:
URL: https://github.com/apache/druid/pull/14207#issuecomment-1540233903
> will it cause any problem if the job was created using a different jdk version and read using a different jdk version?
i tested this locally and java 17 is able to decode java 11 compressed strings and vice versa okay
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] abhishekagarwal87 merged pull request #14207: Fix unit tests for java 17
Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 merged PR #14207:
URL: https://github.com/apache/druid/pull/14207
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org
[GitHub] [druid] abhishekagarwal87 commented on pull request #14207: Fix unit tests for java 17
Posted by "abhishekagarwal87 (via GitHub)" <gi...@apache.org>.
abhishekagarwal87 commented on PR #14207:
URL: https://github.com/apache/druid/pull/14207#issuecomment-1539498738
will it cause any problem if the job was created using a different jdk version and read using a different jdk version?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org