Skip to content

Allow nesting Query Analyzers

Kamil Trzciński requested to merge fix-specs-with-query-analyzers into master

In some circumstances we should allow to nest Query Analyzers. However, we should only initialize new ones within the block.

The usage pattern for which it is needed:

  1. We use default analyzers in regular execution (spec/support/database/query_analyzer.rb)
  2. We register a single purpose analyzer within a block of execution (testing of background migrations via lib/gitlab/database/migration_helpers/restrict_gitlab_schema.rb)

Related #358430 (closed)

Edited by Kamil Trzciński

Merge request reports