summaryrefslogtreecommitdiff
path: root/spec/services
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2018-08-28 11:03:39 +0000
committerNick Thomas <nick@gitlab.com>2018-08-28 11:03:39 +0000
commitad985d8d6be8274a8ea35808a94354a333cb8e8c (patch)
tree22f2b7ff9908a43c58b36137d82ae89171fbb993 /spec/services
parent270c7b6f78cb09c23f14be550ca054da6978002b (diff)
parent414c54cec2e6e3b9c6e4cf003b78a637464b6d8b (diff)
downloadgitlab-ce-ad985d8d6be8274a8ea35808a94354a333cb8e8c.tar.gz
Merge branch '50441-high-number-of-statement-timeouts-in-groupdestroyworker-due-to-sitestatistics' into 'master'
Resolve "High number of statement timeouts in GroupDestroyWorker due to SiteStatistics" Closes #50441 See merge request gitlab-org/gitlab-ce!21366
Diffstat (limited to 'spec/services')
-rw-r--r--spec/services/groups/destroy_service_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/services/groups/destroy_service_spec.rb b/spec/services/groups/destroy_service_spec.rb
index d80d0f5a8a8..97a88b5d697 100644
--- a/spec/services/groups/destroy_service_spec.rb
+++ b/spec/services/groups/destroy_service_spec.rb
@@ -35,6 +35,14 @@ describe Groups::DestroyService do
it { expect(NotificationSetting.unscoped.all).not_to include(notification_setting) }
end
+ context 'site statistics' do
+ it 'doesnt trigger project deletion hooks twice' do
+ expect_any_instance_of(Project).to receive(:untrack_site_statistics).once
+
+ destroy_group(group, user, async)
+ end
+ end
+
context 'mattermost team' do
let!(:chat_team) { create(:chat_team, namespace: group) }