it does not really matter how long you drive it before it pops up, unless it doesnt light in from of the inspector. it is not prohibited to bring the car to inspection right after you reset the ecu.
I had a dodge neon, that was lighting the CE light once the car was shifted into the third gear (3spd auto tranny - solenoid issue). So, I reset the ECU by disconnecting the battery, placed the gear shifter into the second gear, went to the emission station, passed the test, and after I left and put the car into D mode and it upshifted to third gear, the light came on. Need to mention, it was my second visit, and the mechanic asked what I've done to the car, and I replied that I cleaned the connectors, because it is truly the possible reason for the engine light to light up