Remove non-determinism from test