Page MenuHomeSoftware Heritage

templates/stage-cypress-tests: Prevent race condition with support file
ClosedPublic

Authored by anlambert on Oct 26 2022, 5:20 PM.

Details

Summary

Sometimes when multiple cypress processes load the same support file
in parallel, a race condition is encountered as file copy operations
are performed. As a result, the content of the support file is not
loaded and cypress tests will fail (see this job for instance).

So use a specific copy of the support file for each cypress runner
to mitigate that issue.

Diff Detail

Repository
rCJSWH Jenkins jobs
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 32603
Build 51074: arc lint + arc unit

Event Timeline

anlambert edited the summary of this revision. (Show Details)
olasd added a subscriber: olasd.

I'm a bit confused about who is copying what in there, but I trust your judgment...

This revision is now accepted and ready to land.Oct 27 2022, 6:00 PM
In D8782#228466, @olasd wrote:

I'm a bit confused about who is copying what in there, but I trust your judgment...

Cypress parallel tests were designed to run on different hosts using their official dashboard service (non free).
As we run multiple cypress processes in a same container using sorry-cypress, we sometimes hit these kind of race conditions (this is not the first one I fixed).