-
- Downloads
Always set GITLAB_USE_MODEL_LOAD_BALANCING in test env
Otherwise in request specs, we will create factories in one connection (main), while trying to access records in another connection (ci) while running in a controller. This is because SafeRequestStore is not active in the first situation but is active in the other. This possibly is a problem with feature specs as well. This is only a problem when ci database is configured, To fix this, we always set GITLAB_USE_MODEL_LOAD_BALANCING to a non-nil value so that we consistently use the same connection. We already set GITLAB_USE_MODEL_LOAD_BALANCING to true anyway in CI, so let's set that for all test environments. This env var is not used in single database setups, so it shouldn't affect single database setups
parent
ed28668b
No related branches found
No related tags found
Please register or sign in to comment