Throw an error if workspace is not stopped in given time. (#17281)

7.20.x
Katerina Foniok 2020-06-30 14:04:05 +02:00 committed by GitHub
parent 3b2dbca536
commit 3d60fde249
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -164,6 +164,9 @@ export class TestWorkspaceUtil implements ITestWorkspaceUtil {
}
await this.driverHelper.wait(TestConstants.TS_SELENIUM_DEFAULT_POLLING);
}
const wsStatus = await this.processRequestHandler.get(stopWorkspaceApiUrl);
let waitTime = TestConstants.TS_SELENIUM_PLUGIN_PRECENCE_ATTEMPTS*TestConstants.TS_SELENIUM_DEFAULT_POLLING;
throw new error.TimeoutError(`The workspace was not stopped in ${waitTime} ms. Currnet status is: ${wsStatus.data.status}`);
} catch (err) {
console.log(`Stopping workspace failed. URL used: ${stopWorkspaceApiUrl}`);
throw err;