Are you taking it back to the same place? If so, why would it fail, assuming you've done the neccessary work?
Time limit varies entirely according to the MOT garage. They don't *have* to do a retest for free at all - many do, but that's their decision. If the car *only* failed on items in a finite list (on the back of the failure sheet), then they only need to re-test those specific items, even if it leaves their property and comes back another day. These things tend to be very black and white things like blown bulbs, tyres etc - where they're either obviously fine or not, and not things like rust where there's a lot of middle ground. If it fails on anything else, and leaves their premises before getting re-tested, then a full re-test must be carried out. It's entirely up to them whether they charge for this or not, but it's something I'd be finding out *before* taking it to them, not after I've paid my £40 and had the thing tested!!
I think the theory with failures due to stuff like rust is that if they (or arrange for someone to) do the repairs on-site, then they can guarantee that nothing else happened to the car that would affect it's ability to pass an MOT, so the fact that they've done the work satisfies them that the car's up to MOT standards and they'll issue a certificate. I think.
They can give you specific reasons for failure, such as brake imbalance, as they have a properly calibrated (in theory) machine that tells them the braking forces at each wheel (and for the handbrake separately). Unfortunately, the average MOT tester (to my knowledge) is lacking in any psychic ability, and won't know the exact work required on a lot of things (such as brake imbalance) until he's properly inspected it and stripped it down. It could be that brake pads have worn more on one side than the other, but if that's the case, there'll be a reason for that, so you'll be well advised to get new pads on both sides, but not before the imbalance situation is sorted out, as they'll just end up that way again.
The most common fix would be to take the calipers off and clean down (with light emery paper) and properly regrease the sliders. But if that doesn't cure it then the piston could be slightly seized, which'll mean removing it, removing any areas of rust (again by very light abrasion), putting new seals in (you can get a caliper repair kit), doing both sides (if done correctly this will basically make the calipers like new again), and bleeding the system.
But doing the sliders is a simple enough thing to do, and a lot less time consuming than properly rebuilding the whole caliper, so worth doing that, taking it down an empty road, and firmly braking, to see if it pulls to one side at all. If it feels ok, then take it back down. It might be worth having a friendly word with an MOT centre when they're quiet (first thing in the morning might be an idea) and just ask them to quickly put the car on the rollers to check for any brake imbalance to see if you've properly sorted it. If not, then you know that the chances are you'll want to rebuild the calipers. If it's all fine, then problem solved. Bingo!
It'll also be worth checking for any grease on the brake discs, or any contamination in the pads, which would obviously affect braking ability - could be as simple as that.