Skip to content

fix: map driver name arrays in processKiller and increase port 9515 timeout - #950

Open
hoanle0126 wants to merge 1 commit into
webdriverio:mainfrom
hoanle0126:fix/process-killer-driver-names-901
Open

hoanle0126 wants to merge 1 commit into
webdriverio:mainfrom
hoanle0126:fix/process-killer-driver-names-901

Conversation

@hoanle0126

Copy link
Copy Markdown

Proposed changes

In lib/start.js and test/only-driver-tests.js, processKiller(ports, processesName) is called with an array of driver names (Object.keys(opts.drivers), e.g. ['chrome']). However, getConfigProcessesName in lib/processKiller.js ran Object.keys(drivers) on that array, returning array indices (['0']) instead of mapping 'chrome' to 'chromedriver' ('firefox' to 'geckodriver', 'chromiumedge' to 'msedgedriver', etc.). When start was invoked a second time with onlyDriver: 'chrome', processKiller failed to terminate the existing chromedriver process by name and used a 100ms reachability check on port 9515, causing check staring twice chromedriver to fail intermittently.

This updates getConfigProcessesName to accept both driver name arrays and driver config objects, and increases the port 9515 isPortReachable timeout in lib/start.js from 100 to 1000 (matching the existing 1000 timeout used for firefox).

Fixes #901

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist

  • I have read the CONTRIBUTING doc
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

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.

Intermittent test failure

1 participant