Fix race condition with message expectation that is causing test to fail