Our current implementation of testing emails received is WAY too slow!! It uses a sleep loop to watch an IMAP inbox for a message with a particular subject. There are several problems.

The merits of testing the actual IMAP/POP inbox for a message are highly debatable too. Unit testing usually should use mock objects to fake complex parts of the system, but this is funtional end-to-end testing. So what should it do? Is it useful? We’re up to 67 minutes of test time. This is getting ridiculous.