Uploaded image for project: 'Agroal'
  1. Agroal
  2. AG-226

BasicConcurrencyTest.basicConnectionAcquireTest fails on Windows

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.3
    • 1.18, 2.2
    • pool, test
    • None
    • False
    • None
    • False

      The BasicConcurrencyTests.basicConnectionAcquireTest seems to always fail when running on Windows OS. The reason is that the test is taking longer than expected.

      After some testing, debugging and researching, this appears to be a Windows-specific problem, related to the old JVM-argument "ForceTimeHighResolution". When using LockSupport.parkNanos(long nanos) on Windows with a time shorter than a certain 'resolution' there is a minumum park time of about ~16ms. Because the test is using a park time of 1ms and expecting no more than 1.5 times this time, the test always fails on Windows.

      This bug/feature was also blogged about here and is apparantly related to this JDK bug. There is a 'hacky' solution mentioned in both the bug report and the blog post. It would be nice to be able to succesfully run all tests on Windows.

              lbarreiro-1 Luis Barreiro
              kimdlanor Ronald Mik (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: