It will be up to the director. He or she has a right to know. God forbid the student fails again. Schedules, rotations, and academics are not something that can be re-arranged quickly and take hours of work. If the student is a good candidate, I am sure the director will wait and see. The director may also start to work on a contigency in the event he/she fails again. Also remember getting a license, then a DEA, and credentialed takes time. Even if a candidate passes and is notified in early June obtaining the license etc in time for a July1 start may be hard,
Some directors may choose to select another resident. An empty position creates all kind of logistical and financial issues. Our program as done both depending on the student, the year, and how it was handled.
At any rate, study hard, retake the test, and I wish you luck!