The problem is that a surface gets mir_event_type_surface events following creation. But there is no ordering constraint that ensures all of these have arrived before the first mir_event_type_orientation event.
As a consequence we can get the mir_event_type_orientation event followed by a mir_event_type_surface before we call wait_for_event(). Which leads to a timeout and a test failure.
The problem is that a surface gets mir_event_ type_surface events following creation. But there is no ordering constraint that ensures all of these have arrived before the first mir_event_ type_orientatio n event.
As a consequence we can get the mir_event_ type_orientatio n event followed by a mir_event_ type_surface before we call wait_for_event(). Which leads to a timeout and a test failure.