better blocking in Server
Make AppEndToEndTest deterministic in the face of unpredictable thread behaviour