protected void WaitForMessageToArrive() { semaphore.WaitOne((int) receiveTimeout.TotalMilliseconds, true); Assert.IsTrue(received, "Should have received a message by now!"); }