Gradle 硒化物问题,铬在无头汽车中碰撞

Gradle 硒化物问题,铬在无头汽车中碰撞,gradle,selenium-chromedriver,selenide,Gradle,Selenium Chromedriver,Selenide,我每天都在CI上运行一些测试,有时我会看到一些测试随机崩溃,出现错误: Gradle suite > Gradle test > Tests.Shared.InvestorReporting.InvestorReportsContentWithoutEmailsTests > checkIfFundrbirdUserIsAbleToPublishInvestorReport[0](Models.Admins.BaseUser@4df8e2e1) STARTED Gradle s

我每天都在CI上运行一些测试,有时我会看到一些测试随机崩溃,出现错误:

Gradle suite > Gradle test > Tests.Shared.InvestorReporting.InvestorReportsContentWithoutEmailsTests > checkIfFundrbirdUserIsAbleToPublishInvestorReport[0](Models.Admins.BaseUser@4df8e2e1) STARTED
Gradle suite > Gradle test > Tests.Shared.InvestorReporting.InvestorReportsContentWithoutEmailsTests > checkIfFundrbirdUserIsAbleToPublishInvestorReport[0](Models.Admins.BaseUser@4df8e2e1) STANDARD_ERROR
    Starting ChromeDriver 81.0.4044.138 (8c6c7ba89cc9453625af54f11fd83179e23450fa-refs/branch-heads/4044@{#999}) on port 8964
    Only local connections are allowed.
    Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
    [1602777486.077][SEVERE]: bind() failed: Cannot assign requested address (99)
    Test failed.
Gradle suite > Gradle test > Tests.Shared.InvestorReporting.InvestorReportsContentWithoutEmailsTests > checkIfFundrbirdUserIsAbleToPublishInvestorReport[0](Models.Admins.BaseUser@4df8e2e1) FAILED
    org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally.
      (unknown error: DevToolsActivePort file doesn't exist)
      (The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: '88868a6a4e86', ip: '172.19.0.6', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-1052-aws', java.version: '1.8.0_242'
当我重新运行测试时,它将通过。 我使用以下代码运行测试:

./gradlew \
  -Dchromeoptions.args=--disable-gpu,--no-sandbox,--window-size=1920x1080,--disable-infobars,--allow-running-insecure-content,--disable-extension,--disable-web-security,--verbose,--disable-notifications,--disable-software-rasterizer,--test-type=browser,--disable-dev-shm-usage,--no-default-browser-check,--disable-setuid-sandbox \
  -Dchromeoptions.prefs=credentials_enable_service=false,password_manager_enabled=false,download_restrictions=0,download.prompt_for_download=false,download.default_directory="$DOWNLOAD_PATH",chrome_preferences.profile_default_content_settings.popups=0,pdfjs.disabled=true,directory_upgrade=true,prompt_for_download=false \
  -Dselenide.baseUrl="$1://$2" \
  -Dselenide.fastSetValue=true \
  -Dselenide.browser=chrome \
  -Dselenide.browserSize=1920x1080 \
  -Dselenide.timeout=4000 \
  "$suitename" --profile
你知道它为什么会发生以及如何预防吗? 编辑它总是在不同的测试中崩溃