Skip to content

Commit 086f555

Browse files
fix: test
1 parent b4deb7d commit 086f555

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

test/source/browser/browser-pool.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { TIMEOUT_DESTROY_UNEXPECTED_ALERT } from '.';
77
import { launch } from 'puppeteer';
88
import { addDebugHtml, AvaContext, newWithTimeoutsFunc } from '../tests/tooling';
99

10-
class TimeoutError extends Error {}
10+
class TimeoutError extends Error { }
1111

1212
export class BrowserPool {
1313
private semaphore: Semaphore;
@@ -41,6 +41,11 @@ export class BrowserPool {
4141
// Fix for CORS Private Network Access issues with Puppeteer 24.16.0+
4242
'--disable-web-security',
4343
];
44+
45+
if (process.env.CI || process.env.SEMAPHORE) {
46+
args.push('--disable-dev-shm-usage'); // Use /tmp instead of /dev/shm in CI
47+
args.push('--no-zygote'); // Helps prevent zombie processes
48+
}
4449
if (this.isMock) {
4550
args.push('--ignore-certificate-errors');
4651
args.push('--allow-insecure-localhost');
@@ -52,6 +57,7 @@ export class BrowserPool {
5257
headless: false,
5358
devtools: false,
5459
slowMo,
60+
timeout: 90000, // 90 seconds timeout for browser launch (CI can be slow)
5561
});
5662
const handle = new BrowserHandle(browser, this.semaphore, this.height, this.width);
5763
if (closeInitialPage) {

0 commit comments

Comments
 (0)