fix race condition in transportmessage tests