elastic / elastic-otel-java

Apache License 2.0
17 stars 13 forks source link

Test with JDK 23 #428

Closed JonasKunz closed 1 month ago

jackshirazi commented 1 month ago

lol, I thought you meant we needed to add the full framework rather than just this bump!

JonasKunz commented 1 month ago

Looks like it isn't as easy, a test which previously was flaky on 21 now seems to fail consistently for 23. I'll investiage and try to fix the test

JonasKunz commented 1 month ago

Finally found the root cause for the flaky testVirtualThreadsExcludedByDefault: That test would sometimes fail because the native profiling correlation TLS would be non-null even though it should be.

The reason for this was an improper cleanup in testVirtualThreadsStoragePropagatedWithMounts: This test would span lots of virtual thread and populate the carrier thread TLS. After the test the syncinc of virtual thread TLS with the carrier thread TLS would be disabled. The problem now was that we disabled the sync without actually waiting for all virtual threads to be terminated and therefore unmounted. As a result, for some carrier the TLS would not be cleaned up properly, leaking into the testVirtualThreadsExcludedByDefault test.