Fixed tests so that ports get randomized