Revert "test: make barrier test more rigorous"

This reverts commit 6c6c9221679c6cc66ac30fbad5ce086658113ea3.

It introduced a race condition which made tests fail on Linux and SunOS.

Closes #1340