-
Notifications
You must be signed in to change notification settings - Fork 984
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
Update OtlpMeterRegistryTest to run builds on Java 19 #3431
Conversation
That sounds reasonable. I think we should add a comment in the code why we're doing that. Otherwise surely I (and probably others) will forget and it might get buried or not easily found in git history. |
I've opened #3436 for investigating the change in allocation. |
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 think we'll need these changes in the oldest applicable supported maintenance branch, since we will build those with JDK 19 also. That may require splitting the PR since OTLP was added in 1.9.x, but the Tags allocation tests were added to 1.8.x.
|
For the record, I have seen the following error when I switched to the 1.9.x branch:
It has been reproduced consistently, but after I switched to Java 17 and then back to Java 19, it's not reproducible anymore. Based on gradle/gradle#20372, it seems that Gradle 7.6+ would support Java 19 officially. |
The following tests are failing:
ofEmptyDoesNotAllocate()
andandEmptyDoesNotAllocate()
inTagsTest
are failing as their allocated bytes have been changed from 0 to 16 somehow. I'm not sure what makes the difference, so it might be better to investigate further with a dedicated issue if possible.OtlpMeterRegistryTest.distributionSummaryWithHistogramBuckets()
is failing as String representation fordouble
has been changed slightly. See "Double.toString(double) and Float.toString(float) may Return Slightly Different Results" item in https://jdk.java.net/19/release-notesFor the first two tests, I just split the tests into two, one for prior versions and the other for 19+.
For the second test, I changed it to compare with
double
values, not with theirString
representation.