diff options
author | Stan Hu <stanhu@gmail.com> | 2018-02-06 23:44:45 -0800 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-02-12 16:54:21 +0100 |
commit | 4af914c25c44e88556b93ac5b08d63ee22e27c5c (patch) | |
tree | 807b2245139d9dbb5de6aaa6f3a271efa8f1c730 | |
parent | 0a22ff267b2d3d787d3da44d927caac7bd442832 (diff) | |
download | gitlab-ce-4af914c25c44e88556b93ac5b08d63ee22e27c5c.tar.gz |
Disable caching of tables for migration spec that drops a temporary table
This is to fix job failures, such as https://gitlab.com/gitlab-org/gitlab-ee/-/jobs/51409392.
-rw-r--r-- | spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb | 2 | ||||
-rw-r--r-- | spec/support/db_cleaner.rb | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb b/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb index 8590522f3ef..5caf7e6cc4c 100644 --- a/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb +++ b/spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb @@ -1,6 +1,6 @@ require 'spec_helper' -describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :sidekiq do +describe Gitlab::BackgroundMigration::PopulateUntrackedUploads, :sidekiq, :delete_no_cache do include TrackUntrackedUploadsHelpers subject { described_class.new } diff --git a/spec/support/db_cleaner.rb b/spec/support/db_cleaner.rb index 1809ae1d141..259e45ed8e2 100644 --- a/spec/support/db_cleaner.rb +++ b/spec/support/db_cleaner.rb @@ -35,6 +35,10 @@ RSpec.configure do |config| DatabaseCleaner.strategy = :deletion end + config.before(:each, :delete_no_cache) do + DatabaseCleaner.strategy = :deletion, { cache_tables: false } + end + config.before(:each, :migration) do DatabaseCleaner.strategy = :deletion, { cache_tables: false } end |