jtreg should provide way to ensure exclusive access to resources

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P3
    • jtreg4.1
    • Affects Version/s: jtreg4.1
    • Component/s: tools
    • None
    • b04
    • generic
    • generic

      Some tests need exclusive access to shared resources. With greater use of agentvm mode to support concurrent test execution, the need to support exclusive access is becoming more important.

      Proposal

      Support an option on @run main
      /lock[:name]

      Support a commnd line option -lockdir <dir>

      By default, /lock will acquire a JVM lock (on an internal object) for the duration of the action. The object will be specific to the name, if a name is given. Otherwise a default name will be assumed.

      If -lockdir is specified, /lock wil also get a file lock for a temporary file in the specified directory. This can be used to establish locking between concurrent instances of jtreg.

            Assignee:
            Jonathan Gibbons
            Reporter:
            Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: