Added test-loop for barrier