improve wait_for_changes test