diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 74fa65ae347..8b1a1a12928 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -47,7 +47,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [16.x, 18.x, 20.x] steps: - uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f71a7c770de..6829ed49761 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -14,8 +14,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - # node-version: [14.x, 16.x, 18.x] - node-version: [16.x, 18.x] + node-version: [16.x, 18.x, 20.x] os: [ubuntu-latest, windows-latest, macos-latest] steps: - name: Use Node.js ${{ matrix.node-version }} diff --git a/packages/driver-test-support/lib/e2e-suite.js b/packages/driver-test-support/lib/e2e-suite.js index fcbb65ddf80..9dcf4a282ea 100644 --- a/packages/driver-test-support/lib/e2e-suite.js +++ b/packages/driver-test-support/lib/e2e-suite.js @@ -5,6 +5,7 @@ import B from 'bluebird'; import {TEST_HOST, getTestPort, createAppiumURL} from './helpers'; import chai from 'chai'; import sinon from 'sinon'; +import { Agent } from 'node:http'; const should = chai.should(); @@ -148,6 +149,9 @@ export function driverE2ETestSuite(DriverClass, defaultCaps = {}) { describe('session handling', function () { it('should handle idempotency while creating sessions', async function () { + // workaround for https://github.com/node-fetch/node-fetch/issues/1735 + const httpAgent = new Agent({ keepAlive: true }); + const sessionIds = []; let times = 0; do { @@ -159,11 +163,7 @@ export function driverE2ETestSuite(DriverClass, defaultCaps = {}) { headers: { 'X-Idempotency-Key': '123456', }, - // XXX: I'm not sure what these are, as they are not documented axios options, - // nor are they mentioned in our source - // @ts-expect-error - simple: false, - resolveWithFullResponse: true, + httpAgent, } ); @@ -178,6 +178,9 @@ export function driverE2ETestSuite(DriverClass, defaultCaps = {}) { }); it('should handle idempotency while creating parallel sessions', async function () { + // workaround for https://github.com/node-fetch/node-fetch/issues/1735 + const httpAgent = new Agent({ keepAlive: true }); + const reqs = []; let times = 0; do { @@ -192,6 +195,7 @@ export function driverE2ETestSuite(DriverClass, defaultCaps = {}) { headers: { 'X-Idempotency-Key': '12345', }, + httpAgent, } ) );