tests: Further reduce chance of race condition in logging tests