You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix a tricky race in TestUseGoWork, where a view recalculation causes
diagnostics in modb/go.mod to be cleared.
Prior to CL 675016, we'd expect a diagnostic in modb/go.mod because it
had an open file, and so zero config would cause it to be diagnosed.
Subsequent to CL 675016, there is no file, so the diagnostic should be
cleared, but because we *weren't* guarding the assertion in an
'AfterChange' (for obsolete historical reasons, I think), the 'Await'
expression was immediately satisfied except in the rare cases when the
rediagnosis won the race. This is one of the reasons why an unguarded
'Await' is almost always problematic, not least because its failure mode
is to just hang.
Invert the sense of the assertion, and guard the problematic await (and
others) in this test.
Fixesgolang/go#74165
Change-Id: Ie5b9ab6b87ded41afe68830136196ef3588422a7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/684656
LUCI-TryBot-Result: Go LUCI <[email protected]>
Auto-Submit: Robert Findley <[email protected]>
Reviewed-by: Alan Donovan <[email protected]>
`) // TODO(matloob): For some reason there's a "start position 7:0 is out of bounds" error when the ")" is on the last character/line in the file. Rob probably knows what's going on.
0 commit comments