As an intern I took a look at an unloved integration test suite that took something like 8 hours to run. Most of it was resulting from scattered sleeps waiting for Apache Solr replication, so I built a hack that queried Solr to determine the timestamp of replication vs the I think the committed document's timestamp (iirc, it's been a while) and waited for it to be observable, which cut 6 hours off the test's runtime.