The test time frame is no more than three days before your flight. CDC spokesperson Caitlin Shockey says that if you are flying on a connecting flight into the United States, a valid test is one that is taken no more than three days before your first flight departs to the United States but only if the entire trip was booked under a single passenger record. Also, each layover between those connections can't be longer than 24 hours. If your connecting flight to the US was booked separately or you have a longer connection, you need to get tested within the three days before your final flight departs for the US.