This patch fixes a race condition in KeepAliveProperty test. The client thread 
could read the `pass` field and fail the test before the server thread had a 
chance to set the field value to `true`. The fix adds an explicit wait for the 
server thread to complete.

Without this patch, the failure can be easily reproduced by adding a 
`Thread.sleep(100);` before `pass = !expectClose;`.

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

Commit messages:
 - Wait for server thread

Changes: https://git.openjdk.org/jdk/pull/9700/files
 Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=9700&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8285836
  Stats: 1 line in 1 file changed: 1 ins; 0 del; 0 mod
  Patch: https://git.openjdk.org/jdk/pull/9700.diff
  Fetch: git fetch https://git.openjdk.org/jdk pull/9700/head:pull/9700

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

Reply via email to