Skip to content

Fix hanging spec when fully decomposed

Thong Kuah requested to merge fix_hanging_spec_when_fully_decomposed into master

What does this MR do and why?

Do not use transactional tests for this feature spec

The setup for this spec relies on multiple threads, but it hangs with transactional tests + decomposed databases.

We could re-initialize database load balancing to re-establish a correct connection to prevent the hang, but now we cannot see the data we previously created. So the solution is to not use transactional tests, and rely on database cleaner's deletion strategy

To reproduce:

  1. Configure multiple databases following https://docs.gitlab.com/ee/development/database/multiple_databases.html#development-setup

  2. Configure fully decomposed with:

    export GITLAB_USE_MODEL_LOAD_BALANCING=true
  3. Run the spec:

    bin/rspec spec/features/merge_request/user_sees_pipelines_spec.rb -e 'race condition'

It hangs on master

Screenshots or screen recordings

These are strongly recommended to assist reviewers and reduce the time to merge your change.

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Thong Kuah

Merge request reports