Merge "Make the test wait for Main Thread execution." into main