They do tests and labs and a whole work up to determine whether or not the lungs are good/healthy and compatible with the recipient. There are times though that things happen. Something could not "look right" when the donor is opened to retrieve the organ or something could go wrong during the removal of the organ making it not viable for transplant.
Also in regards to the patient - and I don't know if everyone considers this a dry run or not. BUT the recipient could be sick. To my knowledge they won't transplant a patient if they have a fever or some other serious issue working at the time - like some form of infection (with fever) - I was on IVs at the time of my call but since I had no fever and was feeling slightly better they went ahead.
In regards to the first paragraph about something happening to the lung during removal I know of someone at my center that was waiting for transplant and when the organ was being retrieved the person put a clamp in the wrong place and the lung was flooded out - i.e. not usable. He had gone into the OR but came out without having surgery.
Good Luck,
Lindsey