tests: tail-2/assert: avoid risk of race condition