[monorepo] move retries from the outside to the per-test level (#31528)

* [monorepo] move retries from the outside to the per-test level

* [web] increase hookTimeout in CI

* [monorepo] consolidate test retries

- do not retry unit tests
- only retry in ci, optionally locally with "RETRIES=3 make test..."
- add retries for web

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>

---------

Co-authored-by: Eric Mc Sween <eric.mcsween@overleaf.com>
GitOrigin-RevId: 86e45edcfb087d18e0e957ad6df9a6105dcd5770
This commit is contained in:
Jakob Ackermann
2026-02-16 09:06:48 +00:00
committed by Copybot
co-authored by Eric Mc Sween
parent 1f91ca473d
commit dbf6401f22
45 changed files with 45 additions and 11 deletions
+1
View File
@@ -9,6 +9,7 @@ PROJECT_NAME = real-time
BUILD_DIR_NAME = $(shell pwd | xargs basename | tr -cd '[a-zA-Z0-9_.\-]')
HERE=$(shell pwd)
export MONOREPO ?= $(shell cd ../../ && pwd)
export RETRIES ?= $(if $(CI),3,0)
IMAGE_CI ?= ci/$(PROJECT_NAME):$(BRANCH_NAME_TAG_SAFE)-$(BUILD_NUMBER)
IMAGE_REPO ?= us-east1-docker.pkg.dev/overleaf-ops/ol-docker/$(PROJECT_NAME)
IMAGE_REPO_FINAL ?= $(IMAGE_REPO):$(BRANCH_NAME_TAG_SAFE)-$(BUILD_NUMBER)
+1
View File
@@ -30,6 +30,7 @@ services:
image: ci/$PROJECT_NAME:$BRANCH_NAME-$BUILD_NUMBER
environment:
CI:
RETRIES:
REDIS_HOST: redis_test
QUEUES_REDIS_HOST: redis_test
HISTORY_REDIS_HOST: redis_test
+1
View File
@@ -36,6 +36,7 @@ services:
- ../../libraries:/overleaf/libraries
working_dir: /overleaf/services/real-time
environment:
RETRIES:
REDIS_HOST: redis_test
HISTORY_REDIS_HOST: redis_test
QUEUES_REDIS_HOST: redis_test
+1 -1
View File
@@ -6,7 +6,7 @@
"type": "module",
"scripts": {
"start": "node app.js",
"test:acceptance:_run": "mocha --recursive --timeout 15000 --exit $@ test/acceptance/js",
"test:acceptance:_run": "mocha --recursive --timeout 15000 --exit --retries=$RETRIES $@ test/acceptance/js",
"test:acceptance": "npm run test:acceptance:_run -- --grep=$MOCHA_GREP",
"test:unit:_run": "vitest --config ./vitest.config.unit.cjs",
"test:unit": "npm run test:unit:_run",