[test] Fix race in EditTest.DiagsAfterReopen
[test] Fix race in EditTest.DiagsAfterReopen

We weren't accounting for the possibility that the AST would build
faster than we could return editorOpen. While that is very unlikely, we
hit a CI failure at least once.

rdar://52211324

benlangmuir/swift,apple/swift,stephentyrone/swift,aschwaighofer/swift,lorentey/swift,shahmishal/swift,aschwaighofer/swift,harlanhaskins/swift,jmgc/swift,roambotics/swift,jmgc/swift,nathawes/swift,shahmishal/swift,apple/swift,jckarter/swift,jmgc/swift,apple/swift,lorentey/swift,karwa/swift,roambotics/swift,stephentyrone/swift,ahoppen/swift,karwa/swift,gribozavr/swift,parkera/swift,benlangmuir/swift,shahmishal/swift,karwa/swift,xwu/swift,jckarter/swift,hooman/swift,gribozavr/swift,glessard/swift,shahmishal/swift,shahmishal/swift,hooman/swift,roambotics/swift,allevato/swift,CodaFi/swift,rudkx/swift,CodaFi/swift,sschiau/swift,JGiola/swift,airspeedswift/swift,harlanhaskins/swift,lorentey/swift,hooman/swift,ahoppen/swift,parkera/swift,benlangmuir/swift,lorentey/swift,gregomni/swift,rudkx/swift,parkera/swift,tkremenek/swift,tkremenek/swift,devincoughlin/swift,devincoughlin/swift,rudkx/swift,apple/swift,sschiau/swift,devincoughlin/swift,parkera/swift,gregomni/swift,atrick/swift,allevato/swift,allevato/swift,apple/swift,gribozavr/swift,gribozavr/swift,jckarter/swift,nathawes/swift,harlanhaskins/swift,CodaFi/swift,airspeedswift/swift,jmgc/swift,atrick/swift,sschiau/swift,JGiola/swift,nathawes/swift,airspeedswift/swift,rudkx/swift,jmgc/swift,parkera/swift,nathawes/swift,aschwaighofer/swift,harlanhaskins/swift,glessard/swift,shahmishal/swift,sschiau/swift,ahoppen/swift,atrick/swift,rudkx/swift,airspeedswift/swift,aschwaighofer/swift,karwa/swift,tkremenek/swift,hooman/swift,airspeedswift/swift,gribozavr/swift,xwu/swift,glessard/swift,allevato/swift,stephentyrone/swift,karwa/swift,atrick/swift,parkera/swift,airspeedswift/swift,roambotics/swift,stephentyrone/swift,gregomni/swift,jmgc/swift,xwu/swift,jckarter/swift,xwu/swift,harlanhaskins/swift,gribozavr/swift,lorentey/swift,xwu/swift,harlanhaskins/swift,devincoughlin/swift,roambotics/swift,benlangmuir/swift,hooman/swift,sschiau/swift,gregomni/swift,benlangmuir/swift,parkera/swift,shahmishal/swift,airspeedswift/swift,devincoughlin/swift,gribozavr/swift,benlangmuir/swift,allevato/swift,tkremenek/swift,nathawes/swift,jmgc/swift,glessard/swift,lorentey/swift,aschwaighofer/swift,ahoppen/swift,sschiau/swift,gregomni/swift,devincoughlin/swift,rudkx/swift,lorentey/swift,gribozavr/swift,allevato/swift,devincoughlin/swift,jckarter/swift,CodaFi/swift,sschiau/swift,CodaFi/swift,jckarter/swift,xwu/swift,hooman/swift,stephentyrone/swift,nathawes/swift,JGiola/swift,xwu/swift,roambotics/swift,JGiola/swift,glessard/swift,harlanhaskins/swift,aschwaighofer/swift,stephentyrone/swift,gregomni/swift,ahoppen/swift,allevato/swift,karwa/swift,aschwaighofer/swift,JGiola/swift,tkremenek/swift,nathawes/swift,jckarter/swift,apple/swift,JGiola/swift,lorentey/swift,karwa/swift,parkera/swift,devincoughlin/swift,tkremenek/swift,shahmishal/swift,ahoppen/swift,stephentyrone/swift,atrick/swift,CodaFi/swift,glessard/swift,hooman/swift,atrick/swift,CodaFi/swift,tkremenek/swift,sschiau/swift,karwa/swift