diff options
Diffstat (limited to 'spec/lib/gitlab/database/migrations/instrumentation_spec.rb')
-rw-r--r-- | spec/lib/gitlab/database/migrations/instrumentation_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/lib/gitlab/database/migrations/instrumentation_spec.rb b/spec/lib/gitlab/database/migrations/instrumentation_spec.rb index c31244060ec..3540a120b8f 100644 --- a/spec/lib/gitlab/database/migrations/instrumentation_spec.rb +++ b/spec/lib/gitlab/database/migrations/instrumentation_spec.rb @@ -122,7 +122,11 @@ RSpec.describe Gitlab::Database::Migrations::Instrumentation do it 'records observations for all migrations' do subject.observe(version: migration_version, name: migration_name, connection: connection) {} - subject.observe(version: migration_version_2, name: migration_name_2, connection: connection) { raise 'something went wrong' } rescue nil + begin + subject.observe(version: migration_version_2, name: migration_name_2, connection: connection) { raise 'something went wrong' } + rescue StandardError + nil + end expect { load_observation(result_dir, migration_name) }.not_to raise_error expect { load_observation(result_dir, migration_name_2) }.not_to raise_error |