RFR: 8350705: [JMH] test security.SSLHandshake failed for 2 threads configuration

Daniel Jeliński djelinski at openjdk.org
Mon Mar 24 12:59:17 UTC 2025


Update the SSLHandshake benchmark to enable running in multiple threads.

This PR changes the scope of the state from per-benchmark to per-thread. The server SSLContext is still shared across all threads to simulate the scenario where multiple clients try to connect to the same server at the same time.

Before the change, running this benchmark with `make test TEST=micro:SSLHandshake MICRO=OPTIONS="-t 3"` failed with an exception. After this change the benchmark completes successfully.

-------------

Commit messages:
 - Remove outdated comments
 - Initialize server SSLContext once
 - Run benchmark in multiple threads

Changes: https://git.openjdk.org/jdk/pull/24195/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=24195&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8350705
  Stats: 33 lines in 1 file changed: 20 ins; 6 del; 7 mod
  Patch: https://git.openjdk.org/jdk/pull/24195.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/24195/head:pull/24195

PR: https://git.openjdk.org/jdk/pull/24195


More information about the security-dev mailing list