Add a test for a database exception during subsciption listeners gathering