I'm pretty the curvature of the universe has actually been measured to be very close to 0, within margin of error, which would suggest an infinite universe. (It doesn't prove it by any means, though. The curvature could just too small to measure.)
However, the observable universe is indeed finite, due to the speed of light being finite.
It depends on if we develop the capacity to colonize off world, and the rate at which each test occurs. Even a one-lever-a-second rate would be out grown by the current population rate, and yet some limiters to population are catching up to us. So long as we can keep the population growth rate high (which involves securing food and habitat for the people) we can outrun the trolley into the forseeable future.
It's curious how they're selected. During the nuclear age we've had nukes in the hands of fanatics who hated the enemy, who were able to comprehend the gravity of their responsibility enough that not once did a nuclear tipped weapon get launched in error or against orders... or at all.
We're closing on eighty years without an atomic war. Not a small accomplishment. It's one of the few things that gives me hope for humanity.
If we can travel faster than the trolley, we could adjust all switches with one person who continues to travel to the next junction before the trolley arrives!