Typically when your catalytic converter isn’t warmed up enough, your car will put out a lot of pollution. That’s why driving around on the freeway works. If you spend a lot of time idleing while you are waiting for your turn, you run the risk of cooling off your catalytic converter. I’m not sure if it would work, but you might consider gassing your car while you are waiting in line to give your car the best chance at passing.
I’ve got friends with crap cars that they will literally drive around the city loop and go through inspection until they get their emissions under the acceptable ratio.