Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9124878
D8782.id31650.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
D8782.id31650.diff
View Options
diff --git a/jobs/templates/includes/stage-cypress-tests.groovy.j2 b/jobs/templates/includes/stage-cypress-tests.groovy.j2
--- a/jobs/templates/includes/stage-cypress-tests.groovy.j2
+++ b/jobs/templates/includes/stage-cypress-tests.groovy.j2
@@ -74,6 +74,11 @@
# copy database file to the one that will be used by django for that test runner
cp swh-web-test.sqlite3 swh-web-test{{ n }}.sqlite3
+ # prevent a race condition when multiple cypress processes load the same support file in parallel
+ # as copy operations are performed
+ cp cypress/support/e2e.js cypress/support/e2e{{ n }}.js
+ sed -i "s/supportFile: 'cypress\\/support\\/e2e.js'/supportFile: 'cypress\\/support\\/e2e{{ n }}.js'/" cypress.config.js
+
# run django server on a dedicated port for that test runner and wait for it to be up
python3 swh/web/manage.py runserver --nostatic --settings=swh.web.settings.tests 0.0.0.0:500{{ n }}&
wait-for-it -t 90 localhost:500{{ n }}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jun 20, 7:40 PM (3 w, 14 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3213966
Attached To
D8782: templates/stage-cypress-tests: Prevent race condition with support file
Event Timeline
Log In to Comment