-
Notifications
You must be signed in to change notification settings - Fork 3.8k
WIP: Parallel cucumbers #7309
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
base: master
Are you sure you want to change the base?
WIP: Parallel cucumbers #7309
Conversation
Fixes issue 7299
Add CI builds using clang-19 and clang-20
Fix issue 7296
Fix datastore, keep osrm-routed alive Rewrite http client
|
Thanks for working on speeding up the CI! The parallel cucumber approach looks promising. One concern: could we keep the CI matrix changes out of this PR? Switching from macos-13 to macos-15-intel drops test coverage for users on Ventura/Sonoma, and adding clang-20 (which isn't released yet) seems unrelated to the parallelization work. These changes could be discussed separately if there's a reason to drop older platform support. Also spotted a few bugs in osrm_loader.js - there are references to an undefined err variable in the error handlers (lines 45, 118, 132) that would crash if osrm-routed fails. |
|
The PR is still WIP. I will cleanup before releasing it. BTW clang-21 is current. The reason to drop macos-13 is that github does not support it anymore. |
Issue
Fixes #7307 - CI runs up from 0:45h to 4:30h
Improvements
Parallel execution of cucumber tests tremendously improves running times.
CI builds are down to 0:25h.
Note: when using
--parallel Nmake sure there areNcontiguous free ports at theconfigured port number (eg. at ports 5000--5000+N).
A lot more can be configured with profiles (in
cucumber.mjs). Usage examples:On github CI full logs, also containing the outputs from all binaries, are published to
https://reports.cucumber.io/.Code refactored and simplified. ~150 LoC less.
Other Fixes
During development other problems were found and fixed:
The datastore load method now works as expected: one and the same
osrm-routedwillbe running in the background for the whole duration of the test. Previous behaviour: for
each scenario an
osrm-routedwould be spawned, loaded with datastore, and then killedagain.
osrm-datastoreon macOS now correctly waits for other processes to detach from sharedmemory before exiting. Previous behaviour:
osrm-datastoreslept for 50ms and thenboldly announced: 'All clients switched.' This caused tests to fail randomly because
queries were executed against old data.
The data watchdog in
osrm-routednow will emit the message: 'updated facade' rightafter the update (previous behaviour: right before the update), so that it can be used
for process synchronization.
osrm::util::exceptionis now caught in osrm binaries. Previous behaviour: it was notcaught and caused a
SIGABRT(and a core dump).Breaking changes
If you run the tests using the
npx cucumber-js ...calling method you must add either-p devor-p cias the first profile, eg.:instead of:
Old cached files are not cleaned automatically anymore because that interfered with
concurrency. There is no hook in cucumber that runs before the workers start.
We don't support changing the load method in mid-run anymore. (eg. "Given data is loaded
with datastore" no longer works). Reason: With the datastore load method an
osrm-routedwill be constantly running in the background. No secondosrm-routedcanopen the same port again.
Retired Environment Variables
OSRM_CONNECTION_RETRIESOSRM_CONNECTION_EXP_BACKOFF_COEFOther changes
Removed one cache level. CH and MLD are processed and cached separately.
The outputs of osrm binaries are not written into lots of small files anymore. Instead
use the
--format html:test/logs/testlog.htmlcommandline argument to get one big HTMLfile with all outputs embedded.
New configuration variables
New environment variables and/or cucumber
worldParametersentries were introduced. Thewhole configuration is done in
cucumber.mjs.CUCUMBER_TIMEOUTtimeoutCUCUMBER_HTTP_TIMEOUThttpTimeoutCUCUMBER_TEST_PATHtestPathtestCUCUMBER_PROFILES_PATHprofilesPathprofilesCUCUMBER_LOGS_PATHlogsPathtest/logsCUCUMBER_CACHE_PATHcachePathtest/cacheOSRM_BUILD_DIRbuildPathbuildOSRM_LOAD_METHODloadMethodOSRM_ALGORITHMalgorithmOSRM_IPipOSRM_PORTportNew tags
@isolated@with_(datastore|directly|mmap)@no_(datastore|directly|mmap)@with_(ci|mld)@no_(ci|mld)Tasklist
Requirements / Relations
Link any requirements here. Other pull requests this PR is based on?