Convert the locking unittests to repetition-test
Currently the locking tests are using timeouts to ensure an event will 'never happen'. However, this is suboptimal. The patch converts all of these to instead: not wait, but sequence the operations logically and expect that they execute as such. In case of not so, they will timeout with a big (60s) timeout. The 'never happen' is tested by multiple repetitions of the same test - this is not perfect, but again 'X will never happen' is not actually testable. This patch reduces the runtime of the tests from ~5.4 to ~0.8 seconds (with 8 repetitions of each test thas has 'never happen' situations). Reviewed-by: imsnah
Loading
Please register or sign in to comment