Commit dd8f56e8 authored by Yorick Peterse's avatar Yorick Peterse

Merge branch 'whitelisting' into 'master'

Remove Sentry reporting for query limiting

See merge request gitlab-org/gitlab-ce!17092
parents ecd77bd0 e3bd674e
# Query Count Limits # Query Count Limits
Each controller or API endpoint is allowed to execute up to 100 SQL queries. In Each controller or API endpoint is allowed to execute up to 100 SQL queries and
a production environment we'll only log an error in case this threshold is in test environments we'll raise an error when this threshold is exceeded.
exceeded, but in a test environment we'll raise an error instead.
## Solving Failing Tests ## Solving Failing Tests
......
...@@ -51,13 +51,7 @@ module Gitlab ...@@ -51,13 +51,7 @@ module Gitlab
error = ThresholdExceededError.new(error_message) error = ThresholdExceededError.new(error_message)
if raise_error? raise(error) if raise_error?
raise(error)
else
# Raven automatically logs to the Rails log if disabled, thus we don't
# need to manually log anything in case Sentry support is not enabled.
Raven.capture_exception(error)
end
end end
def increment def increment
......
...@@ -59,18 +59,6 @@ describe Gitlab::QueryLimiting::Transaction do ...@@ -59,18 +59,6 @@ describe Gitlab::QueryLimiting::Transaction do
expect { transaction.act_upon_results } expect { transaction.act_upon_results }
.to raise_error(described_class::ThresholdExceededError) .to raise_error(described_class::ThresholdExceededError)
end end
it 'reports the error in Sentry if raising an error is disabled' do
expect(transaction)
.to receive(:raise_error?)
.and_return(false)
expect(Raven)
.to receive(:capture_exception)
.with(an_instance_of(described_class::ThresholdExceededError))
transaction.act_upon_results
end
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment