Skip to content

Clear schema cache for _test_table to resolve flaky specs

Peter Leitzen requested to merge pl-spec-clear-schema-cache-test-table into master

What does this MR do and why?

This MR fixes some flaky specs related to leaking schema cache across specs when _test_table is used.

See #450198 (comment 1878218386) for more details.

#457906 as a follow-up to find a holistic approach to reset schema caches on DDL changes.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

bin/rspec --seed 43141  spec/lib/gitlab/database/unidirectional_copy_trigger_spec.rb  spec/lib/gitlab/database/triggers/assign_desired_sharding_key_spec.rb  spec/support_specs/database/without_check_constraint_spec.rb
Edited by Peter Leitzen

Merge request reports