diff --git a/cypress.json b/cypress.json index 220c332e8..f79ebf340 100644 --- a/cypress.json +++ b/cypress.json @@ -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 } } diff --git a/cypress/plugins/index.js b/cypress/plugins/index.js index 80b077ce8..3cbc4f876 100644 --- a/cypress/plugins/index.js +++ b/cypress/plugins/index.js @@ -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; + }); };