mirror of
https://github.com/golang/go
synced 2024-11-19 04:04:47 -07:00
f038785680
Due to the asynchronous and non-transactional nature of the LSP, writing regtests requires waiting for certain conditions to be met in the client editor. To this point, the only type of condition for which we supported waiting was the presence of diagnostic messages, but we can in principle wait for anything that is triggered by a server notification. This change generalizes the notion of expectations to also encompass log messages. Doing this required expanding the value returned from checking expectations to include a new "Unmeetable" verdict, to account for cases where we know that a condition will never be met (for example if it is a negative assertion). This may be useful for diagnostics as well. A test is added to demonstrate these new expectations, where the initial workspace load fails due to unfetchable dependencies. Additionally, some helper flags are added to help debug regtests without a code change, by allowing changing the test timeout, printing logs, and printing goroutine profiles. Updates golang/go#36879 Change-Id: I4cc194e10a4f181ad36a1a7abbb08ff41954b642 Reviewed-on: https://go-review.googlesource.com/c/tools/+/228399 Run-TryBot: Robert Findley <rfindley@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
definition_test.go | ||
diagnostics_test.go | ||
env.go | ||
formatting_test.go | ||
reg_test.go | ||
serialization_test.go | ||
shared_test.go | ||
wrappers.go |