Make the tests more reliable by explicity creating and shutting down the brokers. Also wait for the brokers to be setup before running the tests