[Gradle, JS] Use karma 6.0 API to set ping timeout

^KT-45621 fixed
This commit is contained in:
Ilya Goncharov
2021-03-22 18:33:14 +03:00
committed by TeamCityServer
parent f318951b64
commit a113df8c43
2 changed files with 2 additions and 1 deletions
@@ -18,7 +18,7 @@ function configureTimeouts(injector) {
webServer.timeout = 0
}
const socketServer = injector.get('socketServer');
if (socketServer) {
if (socketServer && typeof socketServer.set === 'function') {
// Disable socket.io heartbeat (ping) to avoid browser disconnecting when debugging tests,
// because no ping requests are sent when test execution is suspended on a breakpoint.
// Default values are not enough for suspended execution:
@@ -97,4 +97,5 @@ export function fixMochaTimeout(config) {
export function fixBrowserActivityTimeout(config) {
config.browserNoActivityTimeout = null
config.pingTimeout = 24 * 60 * 60 * 1000
}