implement a refresh handler and use it to replace discover tests
When a refresh handler is present, a refresh button will appear in the
test UI panel and will be called when the button is clicked. The
handler returns a promise that resolves when tests are refreshed,
informing the UI to stop progress animations.
The refresh handler is provided a cancellation token which gives the
user with the ability to cancel the operation. This is the reason to
keep the call to ctest as an async spawn instead of syncronous. When
cancellation is requested, the asynchronous process can be signaled to
stop. I tested this by replacing the call to ctest with
sleep infinity which I was able to cancel in the UI and get a nice
error message in the output window.
implement a refresh handler and use it to replace discover tests
When a refresh handler is present, a refresh button will appear in the test UI panel and will be called when the button is clicked. The handler returns a promise that resolves when tests are refreshed, informing the UI to stop progress animations.
The refresh handler is provided a cancellation token which gives the user with the ability to cancel the operation. This is the reason to keep the call to ctest as an async spawn instead of syncronous. When cancellation is requested, the asynchronous process can be signaled to stop. I tested this by replacing the call to
ctest
withsleep infinity
which I was able to cancel in the UI and get a nice error message in the output window.