From 1c20a3feb57f83a78ea35941c79fd2b80e376b95 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Tue, 21 Jan 2025 23:50:03 +0900 Subject: [PATCH] Revert "Disable GPU acceleration in CI tests to mitigate flakiness" This reverts commit 4690bb4cc9299c8633272d406824caa9ac9136e9. --- .circleci/config.yml | 1 - .github/workflows/test-win.yml | 1 - test/browser/browsers/chrome.ts | 11 ----------- 3 files changed, 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ad965b33..ab352ea4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,7 +99,6 @@ commands: name: Jest command: npm run test:coverage -- --ci --reporters=default --reporters=jest-junit <<#parameters.runInBand>>-i<><<^parameters.runInBand>>--maxWorkers=2<> environment: - CHROME_DISABLE_GPU: 1 # Disable GPU acceleration to mitigate flaky tests JEST_JUNIT_CLASSNAME: '{filepath}' JEST_JUNIT_OUTPUT_DIR: tmp/test-results MARP_TEST_CI: 1 diff --git a/.github/workflows/test-win.yml b/.github/workflows/test-win.yml index 61ab1bc4..02ad3a06 100644 --- a/.github/workflows/test-win.yml +++ b/.github/workflows/test-win.yml @@ -48,7 +48,6 @@ jobs: # https://stackoverflow.com/a/59365905 - name: Jest env: - CHROME_DISABLE_GPU: 1 # Disable GPU acceleration to mitigate flaky tests JEST_JUNIT_CLASSNAME: '{filepath}' JEST_JUNIT_OUTPUT_DIR: tmp/test-results MARP_TEST_CI: 1 diff --git a/test/browser/browsers/chrome.ts b/test/browser/browsers/chrome.ts index 4ae232a9..2b380990 100644 --- a/test/browser/browsers/chrome.ts +++ b/test/browser/browsers/chrome.ts @@ -132,17 +132,6 @@ describe('ChromeBrowser', () => { }) describe('Disabling GPU', () => { - it('does not add --disable-gpu argument if CHROME_DISABLE_GPU environment variable is not defined', async () => { - delete process.env.CHROME_DISABLE_GPU - await new ChromeBrowser({ path: '/path/to/chrome' }).launch() - - expect(puppeteer.launch).toHaveBeenCalledWith( - expect.objectContaining({ - args: expect.not.arrayContaining(['--disable-gpu']), - }) - ) - }) - it('adds --disable-gpu argument if CHROME_DISABLE_GPU environment variable is defined', async () => { process.env.CHROME_DISABLE_GPU = '1' await new ChromeBrowser({ path: '/path/to/chrome' }).launch()