OpenHFT / Posix

Other
3 stars 5 forks source link

Fix gettid test #20

Closed rogersimmons closed 2 years ago

rogersimmons commented 2 years ago

The gettid test relies on parallel streams to count the threads. However, the number of threads actually used is arbitrary, and can legitimately be 1 in some cases (highlighted by the Windows build). Refactor the test to use a known number of threads and then robustly check. (Also apply the same change to getpid test - although there the variable number of actual threads used is less of an issue as the pid count should be 1 anyway)