public void ErrorTrackerRemovesAMessageWhichTimedOut() { //Arrange const string messageId = "testId"; var fakeTime = RebusTimeMachine.Now(); TimeMachine.FixTo(fakeTime); //Act errorTracker.TrackDeliveryFail(messageId, new Exception()); errorTracker.TrackDeliveryFail(messageId, new Exception()); TimeMachine.FixTo(fakeTime.Add(timeoutSpan)); errorTracker.CheckForMessageTimeout(); var errorText = errorTracker.GetErrorText(messageId); //Assert Assert.That(errorText, Is.Empty); }