Added wait to test that caused sqlite transaction issues