Add barrier in ScatterTest