Put db into app logic. Add timeouts to test runner helpers.