Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8190730

[TESTBUG] Calling 'docker ps' from VMProps.java to determine presence of docker engine is deemed too heavy

XMLWordPrintable

      JVM Docker tests depend on docker engine being present, accessible and usable on a test host. If these conditions are not met, the docker tests should be skipped.

      The way this is done now is by running "docker ps" within VMProps.java, and then checking the exit code. If exit code is 0, indicating success, this generally guarantees that docker engine is present, accessible and usable by the test user (or an agent running the tests).

      Unfortunately, VMProps.java runs at the beginning of each jtreg test run, and all the "@requires" properties are calculated eagerly, regardless whether a particular test uses a given property or not.

      The concern was raised that calling "docker ps" each time a jtreg test is ran, and waiting for up to 10 seconds to complete is too heavy, and has a potential to considerably slow down test execution. This issue is filed to find a better solution for this.

            mseledtsov Mikhailo Seledtsov
            mseledtsov Mikhailo Seledtsov
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: