I don't remember when the movie was from, but I saw it one to two decades ago. I just have this hazy recollection that all these people lived on what they believed was a spaceship. They are supposed to be on a long voyage to some far off solar system. But in reality they are on earth and are being studied by scientists to figure out the effects of long-term space travel on humans.
I have this visual in my mind of one character sneaking out of the supposed spaceship and that's how the other character figures out they are not on a spaceship.