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
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-09-06 21:57:41 +0300
committerPawel Chojnacki <pawel@chojnacki.ws>2017-11-02 20:11:44 +0300
commite884bfc5262ea899d5880f6193464adaccc668d2 (patch)
tree808d163a0a1e96ffa57d7d34cf580ca446fe4995 /spec/lib/gitlab/metrics_spec.rb
parent9360f37aae056e8598d930dd6e5a5bae203ca53e (diff)
Metric spec adjustment for transaction signature change
Diffstat (limited to 'spec/lib/gitlab/metrics_spec.rb')
-rw-r--r--spec/lib/gitlab/metrics_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/lib/gitlab/metrics_spec.rb b/spec/lib/gitlab/metrics_spec.rb
index 57052f2f140..435c420bf6a 100644
--- a/spec/lib/gitlab/metrics_spec.rb
+++ b/spec/lib/gitlab/metrics_spec.rb
@@ -115,7 +115,7 @@ describe Gitlab::Metrics do
end
context 'with a transaction' do
- let(:transaction) { Gitlab::Metrics::Transaction.new }
+ let(:transaction) { Gitlab::Metrics::Transaction.new({}) }
before do
allow(described_class).to receive(:current_transaction)
@@ -124,13 +124,13 @@ describe Gitlab::Metrics do
it 'adds a metric to the current transaction' do
expect(transaction).to receive(:increment)
- .with('foo_real_time', a_kind_of(Numeric))
+ .with('foo_real_time', a_kind_of(Numeric), false)
expect(transaction).to receive(:increment)
- .with('foo_cpu_time', a_kind_of(Numeric))
+ .with('foo_cpu_time', a_kind_of(Numeric), false)
expect(transaction).to receive(:increment)
- .with('foo_call_count', 1)
+ .with('foo_call_count', 1, false)
described_class.measure(:foo) { 10 }
end
@@ -155,7 +155,7 @@ describe Gitlab::Metrics do
context 'with a transaction' do
it 'sets the action of a transaction' do
- trans = Gitlab::Metrics::Transaction.new
+ trans = Gitlab::Metrics::Transaction.new({})
expect(described_class).to receive(:current_transaction)
.and_return(trans)
@@ -185,7 +185,7 @@ describe Gitlab::Metrics do
context 'with a transaction' do
it 'adds an event' do
- transaction = Gitlab::Metrics::Transaction.new
+ transaction = Gitlab::Metrics::Transaction.new({})
expect(transaction).to receive(:add_event).with(:meow)