Add testing of JDI ThreadStartRequest.addPlatformThreadsOnlyFilter() API

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Unresolved
    • Priority: P3
    • 27
    • Affects Version/s: 19, 26
    • Component/s: core-svc
    • None

      Currently we have no tests that explicitly test ThreadStartRequest.addPlatformThreadsOnlyFilter(). We get some implicit testing via jdb, which does use this API, but if there was a bug in the API it's unlikely any jdb test would fail. It's used by jdb to improve performance by not having ThreadStartEvents enabled for virtual threads, but no current jdb test would fail if this wasn't working correctly.

      Some explicit testing of ThreadStartRequest.addPlatformThreadsOnlyFilter() is needed to verify that when used, no ThreadStartEvents for virtual threads are delivered, and to make sure that expected ThreadStartEvents for platform threads are delivered. The latter is pretty easy to add. For any test that creates ThreadStartRequests, we can have the test use ThreadStartRequest.addPlatformThreadsOnlyFilter() if the test is not being run with JTREG_TEST_THREAD_FACTORY=Virtual.

            Assignee:
            Chris Plummer
            Reporter:
            Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: