Make the custom thread limiter test deterministic (#1276)