@testim/testim-cli 3.278.0 → 3.280.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testim/testim-cli",
3
- "version": "3.278.0",
3
+ "version": "3.280.0",
4
4
  "description": "Command line interface for running Testing on your CI",
5
5
  "author": "Oren Rubin",
6
6
  "contributors": [{
@@ -22,7 +22,6 @@
22
22
  "gulp-preprocess": "3.0.3",
23
23
  "merge-stream": "2.0.0",
24
24
  "proxyquire": "2.1.3",
25
- "request": "2.88.2",
26
25
  "sinon": "9.0.2",
27
26
  "sinon-chai": "3.7.0",
28
27
  "ts-node": "9.1.1",
@@ -44,13 +43,13 @@
44
43
  "dependencies": {
45
44
  "@applitools/eyes-sdk-core": "13.11.21",
46
45
  "@testim/coralogix-logger": "1.1.27-beta.1",
47
- "@testim/webdriverio": "0.0.5",
46
+ "@testim/webdriverio": "0.0.8",
48
47
  "abort-controller": "3.0.0",
49
48
  "ajv": "6.12.6",
50
49
  "analytics-node": "5.0.0",
51
50
  "appium-dom-utils": "1.0.6",
52
51
  "archiver": "5.3.0",
53
- "body-parser": "1.19.1",
52
+ "body-parser": "1.20.1",
54
53
  "chalk": "4.1.2",
55
54
  "chrome-launcher": "0.15.0",
56
55
  "combine-source-map": "0.8.0",
@@ -4,7 +4,7 @@
4
4
 
5
5
  const _ = require('lodash');
6
6
 
7
- const { GridError, ArgError } = require('../errors');
7
+ const { GridError, ArgError, GridConcurrencyError } = require('../errors');
8
8
  const { hasTestPlanFlag, promiseMap } = require('../utils');
9
9
  const { gridMessages, gridTypes } = require('../commons/constants');
10
10
  const logger = require('../commons/logger').getLogger('grid-service');
@@ -97,7 +97,7 @@ async function handleGetGridResponse(projectId, companyId, workerId, browser, ge
97
97
  }
98
98
 
99
99
  if (isError() && res.code === 'no-available-slot') {
100
- throw new GridError(`Failed to run test on ${browser} - concurrency limit reached`);
100
+ throw new GridConcurrencyError(`Failed to run test on ${browser} - concurrency limit reached`);
101
101
  }
102
102
 
103
103
  logger.error('invalid code error response - get grid', { res });
@@ -18,7 +18,7 @@ const { releasePlayer } = require('./workerUtils');
18
18
  const featureFlags = require('../commons/featureFlags');
19
19
  const perf = require('../commons/performance-logger');
20
20
  const {
21
- SeleniumError, StopRunOnError, GridError, GetBrowserError, NotImplementedError, PageNotAvailableError,
21
+ SeleniumError, StopRunOnError, GridError, GetBrowserError, NotImplementedError, PageNotAvailableError, GridConcurrencyError,
22
22
  } = require('../errors');
23
23
 
24
24
  const { GET_BROWSER_TIMEOUT_MSG, TEST_START_TIMEOUT_MSG, TEST_COMPLETE_TIMEOUT_MSG } = timeoutMessages;
@@ -166,7 +166,12 @@ class BaseWorker {
166
166
  try {
167
167
  return await utils.promiseTimeout(this.getSlotOnce(testRunHandler), this.options.getBrowserTimeout, timeoutMessages.GET_BROWSER_TIMEOUT_MSG);
168
168
  } catch (error) {
169
- logger.error('error getting grid slot', { error, testId: this.testId, testResultId: this.testResultId, executionId: this.executionId });
169
+ const logDetails = { testId: this.testId, testResultId: this.testResultId, executionId: this.executionId };
170
+ if (error instanceof GridConcurrencyError) {
171
+ logger.info('could not get grid slot due to concurrency issue', logDetails);
172
+ } else {
173
+ logger.error('error getting grid slot', { error, ...logDetails });
174
+ }
170
175
  failedGetSlotAttempts++;
171
176
  await utils.delay(this.options.getBrowserTimeout - (Date.now() - startTime));
172
177
  throw error;