Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2018-02-07 10:44:45 +0300
committerRémy Coutable <remy@rymai.me>2018-02-12 18:54:21 +0300
commit4af914c25c44e88556b93ac5b08d63ee22e27c5c (patch)
tree807b2245139d9dbb5de6aaa6f3a271efa8f1c730 /spec
parent0a22ff267b2d3d787d3da44d927caac7bd442832 (diff)
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.
Diffstat (limited to 'spec')
-rw-r--r--spec/lib/gitlab/background_migration/populate_untracked_uploads_spec.rb2
-rw-r--r--spec/support/db_cleaner.rb4
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