-
Notifications
You must be signed in to change notification settings - Fork 891
test: Memory leak fix in act runner #5025
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -47,8 +47,13 @@ module.exports = ({ id, title, axeRules, skipTests = [] }) => { | |
| }); | ||
|
|
||
| after(async () => { | ||
| await driver.close(); | ||
| await new Promise(r => server.close(r)); | ||
| try { | ||
| if (driver) await driver.quit(); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a good fix, but this PR is incomplete. |
||
| } catch (err) { | ||
| console.error('Error quitting driver:', err.message); | ||
| } finally { | ||
| if (server) await new Promise(r => server.close(r)); | ||
| } | ||
| }); | ||
|
|
||
| testcases.forEach(testcase => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,7 +5,12 @@ const chromedriverPath = | |
|
|
||
| const getWebdriver = () => { | ||
| const service = new chrome.ServiceBuilder(chromedriverPath); | ||
| const options = new chrome.Options().addArguments('--headless'); | ||
| const options = new chrome.Options().addArguments([ | ||
| '--headless', | ||
| '--no-sandbox', | ||
| '--disable-extensions', | ||
| '--disable-dev-shm-usage' | ||
| ]); | ||
|
Comment on lines
+8
to
+13
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These are reasonable additions, but adding them seems unrelated to this PR. |
||
|
|
||
| if (process.env.CHROME_BIN) { | ||
| options.setBinaryPath(process.env.CHROME_BIN); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be removed prior to merging.