diff options
Diffstat (limited to 'spec/models/namespace/traversal_hierarchy_spec.rb')
-rw-r--r-- | spec/models/namespace/traversal_hierarchy_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/models/namespace/traversal_hierarchy_spec.rb b/spec/models/namespace/traversal_hierarchy_spec.rb index 51932ab943c..918ff6aa154 100644 --- a/spec/models/namespace/traversal_hierarchy_spec.rb +++ b/spec/models/namespace/traversal_hierarchy_spec.rb @@ -85,7 +85,11 @@ RSpec.describe Namespace::TraversalHierarchy, type: :model do it { expect { subject }.to raise_error(ActiveRecord::Deadlocked) } it 'increment db_deadlock counter' do - expect { subject rescue nil }.to change { db_deadlock_total('Namespace#sync_traversal_ids!') }.by(1) + expect do + subject + rescue StandardError + nil + end.to change { db_deadlock_total('Namespace#sync_traversal_ids!') }.by(1) end end end |