I often find myself writing programs that operate on fairly large datasets and complex problem formulations, which usually take on the order of 30 minutes to 2 days of running to identify a bug. The psychological effect of these long testing iterations can be very taxing, and I find it very difficult to change focus and move my mind off of one program and on to another for the 30-ish minutes that a test is running. What strategies can I employ to ease my mind between tests, and change focus more quickly, to achieve a higher productivity?
What I would suggest is to keep your daily or compile/build tests as short as possible. Builds and subsequent unit tests should run as quickly as possible. A day to run tests isn't reasonable, even builds running for more than 15 minutes indicate too much code/too big a project/too many time consuming tests being run.
However, I would not abandon those long running tests. Instead I would schedule them to be weekly or monthly as part of larger regression suite of tests. Kick them off on a Friday or Saturday and examine the results on Monday. If weekly isn't a good interval, go every few days.