From 2e73c8f8cdda42e27cf4a72a4ff643f5864e0cbf Mon Sep 17 00:00:00 2001 From: jmjaffe37 <111303274+jmjaffe37@users.noreply.github.com> Date: Thu, 2 Jul 2026 12:01:00 -0700 Subject: [PATCH 1/2] Updated jetbrains test: https.request() now catches errors. This fixes leaking tests as well (#1070) * Updated jetbrains https.request command to catch errors. This fixes leaking tests as well * Removed deprecated lines from pre-commit and pre-push * added suggestion from PR feedback --- .husky/pre-commit | 3 --- .husky/pre-push | 3 --- .../distributors/jetbrains-installer.test.ts | 24 +++++++++++++++---- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index d24fdfc6..2312dc58 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npx lint-staged diff --git a/.husky/pre-push b/.husky/pre-push index 7d6707f9..192cb67e 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1 @@ -#!/usr/bin/env sh -. "$(dirname -- "$0")/_/husky.sh" - npm run build && npm test diff --git a/__tests__/distributors/jetbrains-installer.test.ts b/__tests__/distributors/jetbrains-installer.test.ts index bf1dc15d..2d32e7e6 100644 --- a/__tests__/distributors/jetbrains-installer.test.ts +++ b/__tests__/distributors/jetbrains-installer.test.ts @@ -87,10 +87,26 @@ describe('findPackageForDownload', () => { const url = resolvedVersion.url; const options = {method: 'HEAD'}; - https.request(url, options, res => { - // JetBrains uses 403 for inexistent packages - expect(res.statusCode).not.toBe(403); - res.resume(); + await new Promise((resolve, reject) => { + const request = https.request(url, options, res => { + let assertionError: unknown; + + try { + // JetBrains uses 403 for non-existent packages + expect(res.statusCode).not.toBe(403); + } catch (error) { + assertionError = error; + } + + res.resume(); + res.once('error', reject); + res.once('end', () => + assertionError ? reject(assertionError as Error) : resolve() + ); + }); + + request.on('error', reject); + request.end(); }); } ); From 324b33387d37f5aa8878ea44bd7144864a316dee Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Thu, 2 Jul 2026 15:30:53 -0400 Subject: [PATCH 2/2] Fix arm64 e2e workflow tests mislabeled as x64 (#1073) * Initial plan * Fix mislabeled arch in e2e workflow job names for Apple silicon runners --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Bruno Borges --- .github/workflows/e2e-versions.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-versions.yml b/.github/workflows/e2e-versions.yml index 4ea83d8b..2bcf4883 100644 --- a/.github/workflows/e2e-versions.yml +++ b/.github/workflows/e2e-versions.yml @@ -19,7 +19,7 @@ permissions: jobs: setup-java-major-versions: - name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} + name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false @@ -96,7 +96,7 @@ jobs: shell: bash setup-java-alpine-linux: - name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - alpine-linux - ${{ matrix.os }} + name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - alpine-linux - ${{ matrix.os }} runs-on: ${{ matrix.os }} container: image: alpine:3.21 @@ -127,7 +127,7 @@ jobs: shell: bash setup-java-major-minor-versions: - name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} + name: ${{ matrix.distribution }} ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }} needs: setup-java-major-versions runs-on: ${{ matrix.os }} strategy: @@ -275,7 +275,7 @@ jobs: shell: bash setup-java-ea-versions-zulu: - name: zulu ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} + name: zulu ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }} needs: setup-java-major-minor-versions runs-on: ${{ matrix.os }} strategy: @@ -302,7 +302,7 @@ jobs: shell: bash setup-java-ea-versions-temurin: - name: temurin ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} + name: temurin ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }} needs: setup-java-major-minor-versions runs-on: ${{ matrix.os }} strategy: @@ -385,7 +385,7 @@ jobs: shell: bash setup-java-ea-versions-sapmachine: - name: sapmachine ${{ matrix.version }} (jdk-x64) - ${{ matrix.os }} + name: sapmachine ${{ matrix.version }} (jdk-${{ contains(matrix.os, 'macos') && !contains(matrix.os, 'intel') && 'arm64' || 'x64' }}) - ${{ matrix.os }} needs: setup-java-major-minor-versions runs-on: ${{ matrix.os }} strategy: