Skip to content

ci: give each edgedriver e2e test its own driver cache dir - #14

Merged
dprevost-LMI merged 2 commits into
webdriverio:mainfrom
dprevost-LMI:fix/edgedriver-e2e-oom
Sep 21, 2026
Merged

dprevost-LMI merged 2 commits into
webdriverio:mainfrom
dprevost-LMI:fix/edgedriver-e2e-oom

Conversation

@dprevost-LMI

Copy link
Copy Markdown
Collaborator

Tests previously shared one cache path (EDGEDRIVER_CACHE_DIR or os.tmpdir()) and deleted+redownloaded into it between tests, racing against whatever process the prior test hadn't fully torn down. Each test now gets a fresh mkdtemp() dir instead, removing the shared-file race entirely. Also drops the EDGE_BINARY_PATH cleanup block, which was dead code: that env var locates the Edge browser binary (see finder.ts), not a driver cache path.

Tests previously shared one cache path (EDGEDRIVER_CACHE_DIR or
os.tmpdir()) and deleted+redownloaded into it between tests, racing
against whatever process the prior test hadn't fully torn down.
Each test now gets a fresh mkdtemp() dir instead, removing the
shared-file race entirely. Also drops the EDGE_BINARY_PATH cleanup
block, which was dead code: that env var locates the Edge browser
binary (see finder.ts), not a driver cache path.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dprevost-LMI
dprevost-LMI enabled auto-merge (squash) September 21, 2026 12:35
afterEach only deleted the per-test cache dir; it never confirmed the
driver process was dead first. On Windows that's a hard EPERM (can't
unlink a running .exe); on Linux/macOS it silently "succeeds" while
the process keeps running and consuming memory - the same mechanism
likely behind the original Ubuntu OOM. Kill is now cross-platform
(taskkill on Windows, pkill elsewhere), runs in afterEach too (not
just beforeEach), and fs.rm gets retries since Windows can lag
briefly releasing the file handle even after the process exits.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@dprevost-LMI
dprevost-LMI merged commit 61c393f into webdriverio:main Sep 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant