Avoid race condition on CLI tests