in src/test-explorer/resolver.ts [238:270]
private async resolveTargets(
parentTest: vscode.TestItem,
cancellationToken?: vscode.CancellationToken
) {
// Request available targets from the build server.
updateDescription(
parentTest,
'Loading: waiting for build server connection'
)
parentTest.error = undefined
const conn = await this.buildServer.getConnection()
updateDescription(parentTest, 'Loading: fetching available targets')
let result: bsp.WorkspaceBuildTargetsResult
try {
result = await conn.sendRequest(
bsp.WorkspaceBuildTargets.type,
cancellationToken
)
this.store.cacheBuildTargetsResult(result)
} catch (e) {
if (e.code === CANCEL_ERROR_CODE) {
updateDescription(
parentTest,
'Refresh Canceled: Contents may be outdated.'
)
return
}
updateDescription(parentTest, 'Error: unable to fetch targets')
throw e
}
await this.processWorkspaceBuildTargetsResult(parentTest, result)
}