Some inconsistency in the Beam API.
We can switch to using waitUntilFinished(1ms) to get the correct pipeline state.