Skip to content

Commit

Permalink
feat: add --disable-dev-shm-usage flag
Browse files Browse the repository at this point in the history
Signed-off-by: SuZhou-Joe <[email protected]>
  • Loading branch information
SuZhou-Joe committed Nov 24, 2023
1 parent f487a8e commit d44ac69
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
4 changes: 1 addition & 3 deletions cypress.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
"VISBUILDER_ENABLED": true,
"DATASOURCE_MANAGEMENT_ENABLED": false,
"ML_COMMONS_DASHBOARDS_ENABLED": true,
"WAIT_FOR_LOADER_BUFFER_MS": 0,
"_COMMENT_FOR_NO_COMMAND_LOG_": "Set NO_COMMAND_LOG to 1 to reduce memory usage, or some test cases will hang there forever.",
"NO_COMMAND_LOG": 1
"WAIT_FOR_LOADER_BUFFER_MS": 0
}
}
10 changes: 10 additions & 0 deletions cypress/plugins/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,14 @@
module.exports = (on, config) => {
// `on` is used to hook into various events Cypress emits
// `config` is the resolved Cypress config
on('before:browser:launch', (browser = {}, launchOptions) => {
if (browser.name === 'chrome' || browser.name === 'chromium') {
/**
* https://developer.chrome.com/docs/puppeteer/troubleshooting/#tips
* In CI, the /dev/shm memory space is too small to run all the tests
*/
launchOptions.args.push('--disable-dev-shm-usage');
}
return launchOptions;
});
};

0 comments on commit d44ac69

Please sign in to comment.