Changes in some flaky tests to use dynamic ports