From 194d2f77a5bb2c7f2494b6d7605efc581971eb91 Mon Sep 17 00:00:00 2001 From: Roman Kuznetsov Date: Mon, 16 Jun 2025 13:51:26 +0300 Subject: [PATCH] fix: use webdriverio connection retries --- package-lock.json | 70 ++++++++++++++++----------------- package.json | 2 +- src/browser/new-browser.ts | 2 +- test/src/browser/new-browser.js | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/package-lock.json b/package-lock.json index dd99598fd..78aabd63c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -17,7 +17,7 @@ "@testplane/devtools": "8.32.3", "@testplane/wdio-protocols": "9.4.6", "@testplane/wdio-utils": "9.5.3", - "@testplane/webdriverio": "9.5.20", + "@testplane/webdriverio": "9.5.21", "@vitest/spy": "2.1.4", "chalk": "2.4.2", "clear-require": "1.0.1", @@ -2813,9 +2813,9 @@ "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" }, "node_modules/@testplane/webdriver": { - "version": "9.5.11", - "resolved": "https://registry.npmjs.org/@testplane/webdriver/-/webdriver-9.5.11.tgz", - "integrity": "sha512-bdAot3V/ipdJBa4R7Zl70m5srwwBiwnZZRDlQ+KGUQfVdEOdw6dyICO75G/cp2NpqmaIgn/PsWlpIaW6tD/uTg==", + "version": "9.5.12", + "resolved": "https://registry.npmjs.org/@testplane/webdriver/-/webdriver-9.5.12.tgz", + "integrity": "sha512-uZTSO8HW2kFH5MGUVWeLY86e95zj3ZX05tYlA31J5sgij7q71TDRMjGJ7xjjjfMoA2U9dFg6ZlrI/WBwkMSEeg==", "dependencies": { "@testplane/wdio-config": "9.5.3", "@testplane/wdio-logger": "9.4.6", @@ -2835,22 +2835,22 @@ } }, "node_modules/@testplane/webdriver/node_modules/@types/node": { - "version": "20.17.47", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.47.tgz", - "integrity": "sha512-3dLX0Upo1v7RvUimvxLeXqwrfyKxUINk0EAM83swP2mlSUcwV73sZy8XhNz8bcZ3VbsfQyC/y6jRdL5tgCNpDQ==", + "version": "20.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.1.tgz", + "integrity": "sha512-jJD50LtlD2dodAEO653i3YF04NWak6jN3ky+Ri3Em3mGR39/glWiboM/IePaRbgwSfqM1TpGXfAg8ohn/4dTgA==", "dependencies": { - "undici-types": "~6.19.2" + "undici-types": "~6.21.0" } }, "node_modules/@testplane/webdriver/node_modules/undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" }, "node_modules/@testplane/webdriverio": { - "version": "9.5.20", - "resolved": "https://registry.npmjs.org/@testplane/webdriverio/-/webdriverio-9.5.20.tgz", - "integrity": "sha512-jCezUdbHd57LdTy8QaYWtdmPW4SijhvYyWaeb9REFMBUwm88KMs18LnCEscRdTciEeiqv9nZ0KcthC/Tm9lI9A==", + "version": "9.5.21", + "resolved": "https://registry.npmjs.org/@testplane/webdriverio/-/webdriverio-9.5.21.tgz", + "integrity": "sha512-KjaFlG+tR67+HIEvMVf1Tf0JhQIEJYB2P7k0Rj/i7LsPJ99Ielvhlf6/WDI2mMUCJBuWV3FJzUdJoZmx21PhMw==", "dependencies": { "@testplane/wdio-config": "9.5.3", "@testplane/wdio-logger": "9.4.6", @@ -2858,7 +2858,7 @@ "@testplane/wdio-repl": "9.4.4", "@testplane/wdio-types": "9.5.3", "@testplane/wdio-utils": "9.5.3", - "@testplane/webdriver": "9.5.11", + "@testplane/webdriver": "9.5.12", "@types/node": "^20.11.30", "@types/sinonjs__fake-timers": "^8.1.5", "archiver": "^7.0.1", @@ -10833,9 +10833,9 @@ } }, "node_modules/normalize-url": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", - "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==", + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.2.tgz", + "integrity": "sha512-Ee/R3SyN4BuynXcnTaekmaVdbDAEiNrHqjQIA37mHU8G9pf7aaAD4ZX3XjBLo6rsdcxA/gtkcNYZLt30ACgynw==", "engines": { "node": ">=14.16" }, @@ -16231,9 +16231,9 @@ } }, "@testplane/webdriver": { - "version": "9.5.11", - "resolved": "https://registry.npmjs.org/@testplane/webdriver/-/webdriver-9.5.11.tgz", - "integrity": "sha512-bdAot3V/ipdJBa4R7Zl70m5srwwBiwnZZRDlQ+KGUQfVdEOdw6dyICO75G/cp2NpqmaIgn/PsWlpIaW6tD/uTg==", + "version": "9.5.12", + "resolved": "https://registry.npmjs.org/@testplane/webdriver/-/webdriver-9.5.12.tgz", + "integrity": "sha512-uZTSO8HW2kFH5MGUVWeLY86e95zj3ZX05tYlA31J5sgij7q71TDRMjGJ7xjjjfMoA2U9dFg6ZlrI/WBwkMSEeg==", "requires": { "@testplane/wdio-config": "9.5.3", "@testplane/wdio-logger": "9.4.6", @@ -16250,24 +16250,24 @@ }, "dependencies": { "@types/node": { - "version": "20.17.47", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.17.47.tgz", - "integrity": "sha512-3dLX0Upo1v7RvUimvxLeXqwrfyKxUINk0EAM83swP2mlSUcwV73sZy8XhNz8bcZ3VbsfQyC/y6jRdL5tgCNpDQ==", + "version": "20.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.1.tgz", + "integrity": "sha512-jJD50LtlD2dodAEO653i3YF04NWak6jN3ky+Ri3Em3mGR39/glWiboM/IePaRbgwSfqM1TpGXfAg8ohn/4dTgA==", "requires": { - "undici-types": "~6.19.2" + "undici-types": "~6.21.0" } }, "undici-types": { - "version": "6.19.8", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", - "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==" + "version": "6.21.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz", + "integrity": "sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==" } } }, "@testplane/webdriverio": { - "version": "9.5.20", - "resolved": "https://registry.npmjs.org/@testplane/webdriverio/-/webdriverio-9.5.20.tgz", - "integrity": "sha512-jCezUdbHd57LdTy8QaYWtdmPW4SijhvYyWaeb9REFMBUwm88KMs18LnCEscRdTciEeiqv9nZ0KcthC/Tm9lI9A==", + "version": "9.5.21", + "resolved": "https://registry.npmjs.org/@testplane/webdriverio/-/webdriverio-9.5.21.tgz", + "integrity": "sha512-KjaFlG+tR67+HIEvMVf1Tf0JhQIEJYB2P7k0Rj/i7LsPJ99Ielvhlf6/WDI2mMUCJBuWV3FJzUdJoZmx21PhMw==", "requires": { "@testplane/wdio-config": "9.5.3", "@testplane/wdio-logger": "9.4.6", @@ -16275,7 +16275,7 @@ "@testplane/wdio-repl": "9.4.4", "@testplane/wdio-types": "9.5.3", "@testplane/wdio-utils": "9.5.3", - "@testplane/webdriver": "9.5.11", + "@testplane/webdriver": "9.5.12", "@types/node": "^20.11.30", "@types/sinonjs__fake-timers": "^8.1.5", "archiver": "^7.0.1", @@ -21528,9 +21528,9 @@ "version": "3.0.0" }, "normalize-url": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.1.tgz", - "integrity": "sha512-IO9QvjUMWxPQQhs60oOu10CRkWCiZzSUkzbXGGV9pviYl1fXYcvkzQ5jV9z8Y6un8ARoVRl4EtC6v6jNqbaJ/w==" + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-8.0.2.tgz", + "integrity": "sha512-Ee/R3SyN4BuynXcnTaekmaVdbDAEiNrHqjQIA37mHU8G9pf7aaAD4ZX3XjBLo6rsdcxA/gtkcNYZLt30ACgynw==" }, "npm-run-path": { "version": "4.0.1", diff --git a/package.json b/package.json index 206c2fc56..a23a184df 100644 --- a/package.json +++ b/package.json @@ -72,7 +72,7 @@ "@testplane/devtools": "8.32.3", "@testplane/wdio-protocols": "9.4.6", "@testplane/wdio-utils": "9.5.3", - "@testplane/webdriverio": "9.5.20", + "@testplane/webdriverio": "9.5.21", "@vitest/spy": "2.1.4", "chalk": "2.4.2", "clear-require": "1.0.1", diff --git a/src/browser/new-browser.ts b/src/browser/new-browser.ts index b981ace38..c0f857b62 100644 --- a/src/browser/new-browser.ts +++ b/src/browser/new-browser.ts @@ -176,7 +176,7 @@ export class NewBrowser extends Browser { capabilities, automationProtocol: devtools ? DEVTOOLS_PROTOCOL : config.automationProtocol, connectionRetryTimeout: config.sessionRequestTimeout || config.httpTimeout, - connectionRetryCount: 0, // testplane has its own advanced retries + connectionRetryCount: 3, baseUrl: config.baseUrl, waitforTimeout: config.waitTimeout, waitforInterval: config.waitInterval, diff --git a/test/src/browser/new-browser.js b/test/src/browser/new-browser.js index b708ae82d..e5b437273 100644 --- a/test/src/browser/new-browser.js +++ b/test/src/browser/new-browser.js @@ -67,7 +67,7 @@ describe("NewBrowser", () => { waitforTimeout: 100, waitforInterval: 50, connectionRetryTimeout: 3000, - connectionRetryCount: 0, + connectionRetryCount: 3, baseUrl: "http://base_url", transformRequest: sinon.match.func, });