Add wait to fix flaky tests.

@jzoldak @clytwynec This should stabilize our builds.

Successful solano build: https://ci.solanolabs.com/reports/1034849